From 5469848faf277c67daf1326b3ce7dc362d43e1e7 Mon Sep 17 00:00:00 2001 From: Benoit Donneaux Date: Thu, 23 May 2024 19:33:32 +0000 Subject: [PATCH] Add steps to continously deploy the Jekyll site (#3) Signed-off-by: Benoit Donneaux Reviewed-on: https://code.lafs.eval.latfa.net/tahoe-lafs/web-landing-page/pulls/3 Co-authored-by: Benoit Donneaux Co-committed-by: Benoit Donneaux --- .gitea/workflows/jekyll.yaml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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/