diff --git a/.gitea/workflows/jekyll.yaml b/.gitea/workflows/jekyll.yaml index 36053cc..b14aff8 100644 --- a/.gitea/workflows/jekyll.yaml +++ b/.gitea/workflows/jekyll.yaml @@ -19,11 +19,11 @@ jobs: id: file_ownership run: | chown -R ${_UID}:${_GID} . - - name: Install docker - id: install_docker + - name: Install requirements + id: install_requirements run: | apt-get -q update - apt-get -q install -y docker-compose + apt-get -q install -y docker-compose rsync apt-get -q clean - name: Verify docker id: verify_docker @@ -43,3 +43,16 @@ jobs: run: | docker-compose run --rm -v "${JOB_CONTAINER_NAME}:/site" -w /site \ jekyll build --verbose + - name: Prepare ssh key + id: prepare_ssh_key + if: ${{ github.ref == 'main' }} + run: | + echo "${{ secrets.WWW_DEPLOY_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + - name: Publish Jekyll site + id: publish_site + if: ${{ github.ref == 'main' }} + run: | + rsync -halvi \ + -e "ssh -a -x -o StrictHostKeyChecking=no" \ + ./_site/ www@lafs.eval.latfa.net:/var/www/site/