Eric Bower
·
27 Jul 24
static.yml
1name: static
2on:
3 push:
4 branches:
5 - main
6jobs:
7 static:
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v3
11 with:
12 # need entire history
13 fetch-depth: 0
14 - uses: actions/setup-go@v4
15 with:
16 go-version: '1.22'
17 - name: install pgit
18 run: |
19 go install github.com/picosh/pgit@v1.0.1
20 - name: generate site
21 run: |
22 pgit \
23 --out ./public \
24 --label neovimcraft \
25 --desc "website that makes it easy to find neovim plugins" \
26 --clone-url "https://github.com/neurosnap/neovimcraft.git" \
27 --home-url "https://git.erock.io" \
28 --revs main
29 - name: Set outputs
30 id: vars
31 run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
32 - name: publish to pgs
33 uses: picosh/pgs-action@main
34 with:
35 user: erock
36 key: ${{ secrets.PRIVATE_KEY }}
37 src: './public/'
38 project: "git-neovimcraft-${{ steps.vars.outputs.sha_short }}"
39 promote: "git-neovimcraft"
40 retain: "git-neovimcraft-"
41 retain_num: 1