-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (51 loc) · 1.66 KB
/
Copy pathdocs.yml
File metadata and controls
61 lines (51 loc) · 1.66 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
# Allow one deploy at a time; let an in-flight run finish so a partial
# upload is never published.
concurrency:
group: pages
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
# Sarde infers a page's date from its git commit when frontmatter
# omits one, so the full history has to be present.
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: "1.25"
cache-dependency-path: go.sum
# Built from source rather than via getsarde/action, which installs the
# latest *released* binary. This repo's docs must be built by the code
# being released, otherwise a release would publish docs generated by the
# previous version. Downstream sites should use getsarde/action instead.
- name: Build the sarde binary
run: go build -o sarde ./cmd/sarde
# base_path and site url come from docs/sarde.yaml. Do not pass --baseURL
# here: it overrides site.url, not the path prefix, and would corrupt
# canonical links, OG tags, the sitemap, and the feeds.
- name: Build the docs site
run: ./sarde build docs
- uses: actions/configure-pages@v6
- uses: actions/upload-pages-artifact@v3
with:
path: docs/dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5