Skip to content

Commit b3b2c47

Browse files
committed
chore(github): deploy docs site from main
1 parent 5de8eb6 commit b3b2c47

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

.github/workflows/deploy-site.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy to GitHub Pages
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
working-directory: site
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
# Review gh actions docs if you want to further define triggers, paths, etc
13+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
14+
15+
jobs:
16+
deploy:
17+
name: Deploy to GitHub Pages
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: pnpm/action-setup@v4
22+
with:
23+
version: 10
24+
- uses: actions/setup-node@v4
25+
with:
26+
node-version: 20
27+
cache: "pnpm"
28+
- name: Install dependencies
29+
run: pnpm install
30+
- name: Build website
31+
run: pnpm run build
32+
33+
# Popular action to deploy to GitHub Pages:
34+
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
35+
- name: Deploy to GitHub Pages
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
# Build output to publish to the `gh-pages` branch:
40+
publish_dir: ./site/dist
41+
# The following lines assign commit authorship to the official
42+
# GH-Actions bot for deploys to `gh-pages` branch:
43+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
44+
# The GH actions bot is used by default if you didn't specify the two fields.
45+
# You can swap them out with your own user credentials.
46+
user_name: github-actions[bot]
47+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

.github/workflows/test-site.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Test deployment
2+
3+
defaults:
4+
run:
5+
shell: bash
6+
working-directory: site
7+
8+
on:
9+
push:
10+
branches:
11+
- main
12+
13+
jobs:
14+
test-deploy:
15+
name: Test deployment
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: pnpm/action-setup@v4
20+
with:
21+
version: 10
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 20
25+
cache: "pnpm"
26+
- name: Install dependencies
27+
run: pnpm install
28+
- name: Test build website
29+
run: pnpm run build

0 commit comments

Comments
 (0)