diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 28d41b9..23c0d70 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -26,4 +26,19 @@ jobs: run: /home/runner/go/bin/swag init --parseDependency=true -d . -g cmd/pushbits/main.go - name: Build static html run: npx redoc-cli bundle docs/swagger.yaml --output index.html - # TODO copy index.html to new repo \ No newline at end of file + - name: Setup SSH Keys and known_hosts + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + ssh-add - <<< "${{ secrets.WEBSITE_DEPLOY_KEY }}" + - name: Checkout website + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: mkdir /website && git clone git@github.com:pushbits/website.git /website + - name: Copy index.html + run: cp index.html /website/index.html + - name: Commit and push + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: cd /website && git commit -m "Update to ${{ github.sha }}" && git push