-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (35 loc) · 1.02 KB
/
Copy pathdocs.yml
File metadata and controls
44 lines (35 loc) · 1.02 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
name: Docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Zig
id: cache-zig
uses: actions/cache@v4
with:
path: zig-x86_64-linux-0.16.0
key: zig-0.16.0-linux-x86_64
- name: Download Zig 0.16.0
if: steps.cache-zig.outputs.cache-hit != 'true'
run: |
wget -q https://ziglang.org/download/0.16.0/zig-x86_64-linux-0.16.0.tar.xz
tar -xf zig-x86_64-linux-0.16.0.tar.xz
- name: Add Zig to PATH
run: echo "$GITHUB_WORKSPACE/zig-x86_64-linux-0.16.0" >> $GITHUB_PATH
- name: Build docs
run: zig build docs
- name: Deploy to docs branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./zig-out/docs
publish_branch: docs
force_orphan: true