Skip to content

Bump version

Bump version #80

Workflow file for this run

name: Documentation
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
env:
GO_VERSION: '1.21.1'
PB_BUILD_VERSION: unknown # Needed for using Make targets.
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
jobs:
build_documentation:
name: Build documentation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Export GOBIN
uses: actions/setup-go@v4
with:
go-version: '${{env.GO_VERSION}}'
- name: Install dependencies
run: make setup
- name: Install redoc
run: sudo apt install npm && sudo npm install redoc
- name: Build the API documentation
run: make swag
- name: Build static HTML
run: npx redoc-cli build docs/swagger.yaml --output index.html
- name: Setup SSH keys and known_hosts
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.WEBSITE_DEPLOY_KEY }}"
- name: Checkout website
run: mkdir website && git clone [email protected]:pushbits/website.git website
- name: Copy index.html
run: cp index.html website/static/api/index.html
- name: Set Git config
run: git config --global user.email "[email protected]" && git config --global user.name "PushBits Pipeline"
- name: Commit and push
run: |
cd website
git diff --quiet || ( git add . && git commit -m "Update documentation to ${{ github.sha }}" && git push )