- commit
- 510e1db
- parent
- f502452
- author
- Eric Bower
- date
- 2023-08-14 03:07:45 +0000 UTC
chore: automatically publish static site to pgs
3 files changed,
+30,
-4
+26,
-0
1@@ -0,0 +1,26 @@
2+name: pgs-static-site
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+ - name: Set outputs
13+ id: vars
14+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
15+ - name: build
16+ - uses: actions/setup-go@v4
17+ with:
18+ go-version: '1.20'
19+ run: make pgs-static pgs-site
20+ - name: publish to pgs
21+ uses: picosh/pgs-action@main
22+ with:
23+ user: erock
24+ key: ${{ secrets.PRIVATE_KEY }}
25+ src: './public/*'
26+ project: "pgs-${{ steps.vars.outputs.sha_short }}"
27+ promote: "pgs-prod"
+1,
-1
1@@ -12,4 +12,4 @@ ssh_data
2 .storage
3 __debug_bin
4 .bin
5-tmp/
6+public/
M
Makefile
+3,
-3
1@@ -64,10 +64,10 @@ pgs-static:
2 .PHONY: pgs-static
3
4 pgs-site:
5- rm -rf tmp
6- mkdir tmp
7+ rm -rf public
8+ mkdir public
9 PGS_EMAIL=hello@pico.sh PGS_DOMAIN=pgs.sh PGS_PROTOCOL=https ./build/pgs-static -out ./tmp
10- cp ./pgs/public/* ./tmp
11+ cp ./pgs/public/* ./public
12 .PHONY: pgs-site
13
14 pgs-deploy: pgs-static pgs-site