- commit
- 4a34fa3
- parent
- 03ee9cc
- author
- Eric Bower
- date
- 2023-08-13 19:43:00 +0000 UTC
feat: pgit static site generation
1 files changed,
+39,
-0
+39,
-0
1@@ -0,0 +1,39 @@
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 install github.com/picosh/pgit@latest
21+ - name: generate site
22+ run: |
23+ pgit \
24+ --out ./public \
25+ --label pico \
26+ --desc "pico services - prose.sh, lists.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh" \
27+ --clone-url "https://github.com/picosh/pico.git" \
28+ --home-url "https://git.erock.io" \
29+ --revs main
30+ - name: Set outputs
31+ id: vars
32+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
33+ - name: publish to pgs
34+ uses: picosh/pgs-action@main
35+ with:
36+ user: erock
37+ key: ${{ secrets.PRIVATE_KEY }}
38+ src: './public/*'
39+ project: "git-pico-${{ steps.vars.outputs.sha_short }}"
40+ promote: "git-pico"