Eric Bower
·
27 Jul 24
docs.yml
1name: docs
2on:
3 push:
4 branches:
5 - main
6jobs:
7 static:
8 runs-on: ubuntu-latest
9 defaults:
10 run:
11 working-directory: ./docs
12 steps:
13 - uses: actions/checkout@v3
14 with:
15 # need entire history
16 fetch-depth: 0
17 - uses: actions/setup-go@v4
18 with:
19 go-version: '1.22'
20 - name: generate site
21 run: |
22 go mod tidy
23 make ssg
24 - name: Set outputs
25 id: vars
26 run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
27 - name: publish to pgs
28 uses: picosh/pgs-action@main
29 with:
30 user: erock
31 key: ${{ secrets.PRIVATE_KEY }}
32 src: './docs/public/'
33 project: "starfx-docs-${{ steps.vars.outputs.sha_short }}"
34 promote: "starfx-prod"
35 retain: "starfx-docs"
36 retain_num: 1