Skip to content

Commit 60e409e

Browse files
committed
feat: add github workflow to build and publish site
1 parent 66e6a01 commit 60e409e

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "Publish Docs"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publishing:
10+
name: Publish Site
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
steps:
16+
17+
- name: 📥 Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Build documentation
23+
working-directory: docs
24+
run: |
25+
# Only warn on broken links here as the individual documentation builds
26+
# should have failed with broken links originally.
27+
sed -i 's|onBrokenLinks: "throw"|onBrokenLinks: "warn"|' docusaurus.config.ts
28+
29+
yarn
30+
yarn build
31+
32+
mkdir -p /tmp/public
33+
mv build/* /tmp/public
34+
# Clean the working copy
35+
git clean -dxf
36+
37+
- name: 🚢 Publish Documentation
38+
uses: peaceiris/actions-gh-pages@v4
39+
with:
40+
github_token: ${{ secrets.GITHUB_TOKEN || github.token }}
41+
publish_dir: /tmp/public
42+
enable_jekyll: true
43+
force_orphan: true

0 commit comments

Comments
 (0)