-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (42 loc) · 1.24 KB
/
pages.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
41
42
43
name: Pages
on:
push:
paths:
- vangen.json
schedule:
# At 06:00 UTC on Monday.
- cron: '0 6 * * 1'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3.0.2
- name: Install Go
uses: actions/setup-go@v3.2.0
with:
go-version-file: .go-version
cache: true
cache-dependency-path: '**/go.sum'
- name: Install vangen
run: go install 4d63.com/vangen@v1.2.0
- name: Install golds
run: go install go101.org/golds@v0.4.9
- name: Build pages
run: |
vangen -out build
golds -dir=build/doc -gen -silent -footer=simple -wdpkgs-listing=solo all
touch build/.nojekyll
echo go.pact.im >build/CNAME
- name: Push branch
working-directory: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git init -q -b gh-pages
git config user.name actions-user
git config user.email actions@github.com
git add -A
git commit -q -m "${GITHUB_SHA}"
git push -f "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${GITHUB_SERVER_URL#https://}/${GITHUB_REPOSITORY}.git"