From 6ef15a4b95bddfb27d1e487958953447ea8aa5e7 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Sun, 4 Feb 2024 14:12:51 +0100 Subject: [PATCH 1/2] docs: Fix upload in github action Changes to have the known hosts added got lost on the way Signed-off-by: Andrej Rode --- .github/workflows/publish_docs.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index c918d32a..8d420e95 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -22,8 +22,12 @@ jobs: run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null ssh-add - <<< "${{ secrets.SSH_KEY }}" + mkdir $HOME/.ssh + echo -n "${{ secrets.SSH_KNOWN_HOST }}" > $HOME/.ssh/known_hosts - name: Upload via SSH - run: 'tar -cz build/html/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "mkdir -p /www/$(date +%Y.%m.%d); cd /www/$(date +%Y.%m.%d); tar --strip-components=1 -xz; rm /www/live; cd /www; ln -sf $(date +%Y.%m.%d) live;"' + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: 'tar -cz build/html/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_SERVER }} "mkdir -p /www/$(date +%Y.%m.%d); cd /www/$(date +%Y.%m.%d); tar --strip-components=1 -xz; rm /www/live; cd /www; ln -sf $(date +%Y.%m.%d) live;"' - uses: actions/upload-artifact@v4 with: name: volk_docs From 072d9e269081002cfc816c326bffa10c2b81e463 Mon Sep 17 00:00:00 2001 From: Andrej Rode Date: Sat, 24 Feb 2024 16:48:51 +0100 Subject: [PATCH 2/2] docs: Upload to ref_type subdirectory Signed-off-by: Andrej Rode --- .github/workflows/publish_docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index 8d420e95..0990727f 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -27,7 +27,8 @@ jobs: - name: Upload via SSH env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock - run: 'tar -cz build/html/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_SERVER }} "mkdir -p /www/$(date +%Y.%m.%d); cd /www/$(date +%Y.%m.%d); tar --strip-components=1 -xz; rm /www/live; cd /www; ln -sf $(date +%Y.%m.%d) live;"' + TARGET_DIR: "${{ github.ref_type }}/${{ github.ref_name }}" + run: 'tar -cz build/html/ | ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_SERVER }} "mkdir -p /www/${{ env.TARGET_DIR }}/$(date +%Y.%m.%d); cd /www/${{ env.TARGET_DIR }}/$(date +%Y.%m.%d); tar --strip-components=2 -xz; rm /www/${{ env.TARGET_DIR }}/live; cd /www/${{ env.TARGET_DIR }}; ln -sf $(date +%Y.%m.%d) live;"' - uses: actions/upload-artifact@v4 with: name: volk_docs