add push to website repo

This commit is contained in:
Cubicroot 2021-10-11 19:21:26 +02:00
parent 62af2424fa
commit 1f7568f2e7

View file

@ -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
- 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