|
|
|
name: CI
|
|
|
|
on: push
|
|
|
|
jobs:
|
|
|
|
docker_demo:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- run: apt update && apt install -y openssh-client git rsync golang-go sshpass
|
|
|
|
- name: Setup Hugo
|
|
|
|
env:
|
|
|
|
HUGO_VERSION: 0.105.0
|
|
|
|
run: |
|
|
|
|
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
|
|
|
|
tar -xvzf hugo.tar.gz
|
|
|
|
mv hugo /usr/local/bin
|
|
|
|
- shell: bash
|
|
|
|
env:
|
|
|
|
clave_ssh: ${{ secrets.CLAVE_SSH }}
|
|
|
|
contra: ${{ secrets.CONTRA }}
|
|
|
|
run: |
|
|
|
|
eval $(ssh-agent)
|
|
|
|
ssh-add - <<< "$clave_ssh"
|
|
|
|
#./subir.sh
|
|
|
|
#hugo
|
|
|
|
echo $clave_ssh > clave_ssh
|
|
|
|
chmod 600 clave_ssh
|
|
|
|
ssh -i clave_ssh -o StrictHostKeyChecking=no -vvv calcetines@nodriza.robertops.com
|
|
|
|
ssh -i clave_ssh -o StrictHostKeyChecking=no calcetines@nodriza.robertops.com echo "Connection successful
|
|
|
|
rsync -e "ssh -i clave_ssh" -azP public/* calcetines@nodriza.robertops.com:/home/calcetines/blog/
|
|
|
|
|