Skip to content
This repository was archived by the owner on Mar 22, 2026. It is now read-only.

Commit ab1a92f

Browse files
committed
加入 GitHub Actions 到 GitHub Pages 的部署
1 parent a4280a6 commit ab1a92f

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy TouchControllerWiki site
2+
3+
on:
4+
push:
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Bazel
26+
uses: bazel-contrib/setup-bazel@0.14.0
27+
with:
28+
bazelisk-cache: true
29+
disk-cache: ${{ github.workflow }}
30+
repository-cache: true
31+
- name: Setup Pages
32+
uses: actions/configure-pages@v4
33+
- name: Build
34+
run: bazel build //touchcontroller/wiki
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: bazel-bin/touchcontroller/wiki/wiki
39+
40+
deploy:
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
needs: build
45+
runs-on: ubuntu-latest
46+
name: Deploy
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)