Skip to content

Commit c429b01

Browse files
committed
fxi: ci generate docs
1 parent 9951ba9 commit c429b01

File tree

2 files changed

+50
-55
lines changed

2 files changed

+50
-55
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# https://github.com/webui-dev/zig-webui
33
# Licensed under MIT License.
44
# All rights reserved.
5-
65
name: CI
76
on:
87
push:
@@ -12,7 +11,7 @@ on:
1211
branches: [main]
1312
paths:
1413
- "**.zig"
15-
# schedule:
14+
# schedule:
1615
# - cron: "0 2 * * *"
1716
jobs:
1817
build:
@@ -40,7 +39,7 @@ jobs:
4039
lint:
4140
runs-on: ubuntu-latest
4241
steps:
43-
- name: Setup Zig
44-
uses: goto-bus-stop/setup-zig@v2
45-
- name: Verify formatting
46-
run: zig fmt .
42+
- name: Setup Zig
43+
uses: goto-bus-stop/setup-zig@v2
44+
- name: Verify formatting
45+
run: zig fmt .

.github/workflows/deploy_docs.yml

Lines changed: 45 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -2,60 +2,56 @@
22
# https://github.com/webui-dev/zig-webui
33
# Licensed under MIT License.
44
# All rights reserved.
5-
65
name: DeployDocs
7-
86
on:
9-
push:
10-
branches: [main]
11-
12-
# Allows you to run this workflow manually from the Actions tab
13-
workflow_dispatch:
14-
inputs:
15-
logLevel:
16-
description: "Log level"
17-
required: true
18-
default: "warning"
19-
tags:
20-
description: "deploy docs"
21-
7+
push:
8+
branches: [main]
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
inputs:
12+
logLevel:
13+
description: "Log level"
14+
required: true
15+
default: "warning"
16+
tags:
17+
description: "deploy docs"
2218
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2319
permissions:
24-
contents: write
25-
pages: write
26-
id-token: write
27-
20+
contents: write
21+
pages: write
22+
id-token: write
2823
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
2924
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
3025
concurrency:
31-
group: pages
32-
cancel-in-progress: false
33-
26+
group: pages
27+
cancel-in-progress: false
3428
jobs:
35-
# Build job
36-
build:
37-
runs-on: ubuntu-latest
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v3
41-
with:
42-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
43-
- uses: goto-bus-stop/setup-zig@v2
44-
- name: remove ./src/examples
45-
run: rm -rf ./src/examples
46-
- name: Generate Docs
47-
run: zig build docs
48-
- name: Upload artifact
49-
uses: actions/upload-pages-artifact@v3
50-
with:
51-
path: ./zig-out/docs
52-
deploy:
53-
environment:
54-
name: github-pages
55-
url: ${{ steps.deployment.outputs.page_url }}
56-
runs-on: ubuntu-latest
57-
needs: build
58-
steps:
59-
- name: Deploy to GitHub Pages
60-
id: deployment
61-
uses: actions/deploy-pages@v4
29+
# Build job
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
with:
36+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
37+
- uses: goto-bus-stop/setup-zig@v2
38+
with:
39+
version: latest
40+
- name: remove ./src/examples
41+
run: rm -rf ./src/examples
42+
- name: Generate Docs
43+
run: zig build docs
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: ./zig-out/docs
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
runs-on: ubuntu-latest
53+
needs: build
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)