-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.06 KB
/
static.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: static
on:
push:
branches:
- main
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# need entire history
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: install pgit
run: |
go install github.com/picosh/pgit@latest
- name: generate site
run: |
pgit \
--out ./public \
--label ops \
--desc "infra for pico services" \
--clone-url "https://github.com/picosh/ops.git" \
--home-url "https://git.erock.io" \
--revs main
- name: Set outputs
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: publish to pgs
uses: picosh/pgs-action@v3
with:
user: hey
key: ${{ secrets.PRIVATE_KEY }}
src: './public/'
project: "git-ops-${{ steps.vars.outputs.sha_short }}"
promote: "git-ops"
retain: "git-ops-"