- commit
- f4b25d2
- parent
- fbfac6c
- author
- Eric Bower
- date
- 2023-08-13 19:38:22 +0000 UTC
feat: added gha for pgit
1 files changed,
+40,
-0
+40,
-0
1@@ -0,0 +1,40 @@
2+name: static
3+on:
4+ push:
5+ branches:
6+ - main
7+jobs:
8+ static:
9+ runs-on: ubuntu-latest
10+ steps:
11+ - uses: actions/checkout@v3
12+ with:
13+ # need entire history
14+ fetch-depth: 0
15+ - uses: actions/setup-go@v4
16+ with:
17+ go-version: '1.20'
18+ - name: install pgit
19+ run: |
20+ go get github.com/picosh/pgit
21+ go install github.com/picosh/pgit
22+ - name: generate site
23+ run: |
24+ pgit \
25+ --out ./public \
26+ --label ops \
27+ --desc "infra for pico services" \
28+ --clone-url "https://github.com/picosh/ops.git" \
29+ --home-url "https://git.erock.io" \
30+ --revs main
31+ - name: Set outputs
32+ id: vars
33+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
34+ - name: publish to pgs
35+ uses: picosh/pgs-action@main
36+ with:
37+ user: erock
38+ key: ${{ secrets.PRIVATE_KEY }}
39+ src: './public/*'
40+ project: "git-ops-${{ steps.vars.outputs.sha_short }}"
41+ promote: "git-ops"