diff --git a/.gitea/workflows/jekyll.yaml b/.gitea/workflows/jekyll.yaml index 6f9df58..65ca373 100644 --- a/.gitea/workflows/jekyll.yaml +++ b/.gitea/workflows/jekyll.yaml @@ -47,15 +47,6 @@ jobs: docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \ jekyll build --verbose continue-on-error: true - - name: Prepare ssh key - id: prepare_ssh_key - if: ${{ gitea.ref == 'refs/heads/main' }} - run: | - echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - rsync -n -halvi \ - -e "ssh -a -x -o StrictHostKeyChecking=no" \ - ./_site/ www@lafs.eval.latfa.net:/var/www/site/ - name: Deploy Jekyll site id: deploy_site run: | @@ -71,6 +62,9 @@ jobs: # Save those variabes in the environment for the next steps echo "WEB_HOST=${WEB_HOST}" >> $GITHUB_ENV echo "WEB_CONTEXT=${WEB_CONTEXT}" >> $GITHUB_ENV + # Prepare ssh key + echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 # Synchronize the local and the remote site rsync -halvi --delete \ -e "ssh -a -x -o StrictHostKeyChecking=no" \