diff --git a/.github/workflows/publish_docs.yml b/.github/workflows/publish_docs.yml index c918d32a..0990727f 100644 --- a/.github/workflows/publish_docs.yml +++ b/.github/workflows/publish_docs.yml @@ -22,8 +22,13 @@ 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 + 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