Skip to content

Commit f230934

Browse files
committed
Add GitHub Actions for Docusaurus deploy
1 parent f677904 commit f230934

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy Docusaurus to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main # build and deploy whenever main is updated
7+
8+
jobs:
9+
build-deploy:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # allow pushing to gh-pages
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 18
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Build website
28+
run: yarn build
29+
30+
- name: Deploy to GitHub Pages
31+
uses: peaceiris/actions-gh-pages@v4
32+
with:
33+
github_token: ${{ secrets.GITHUB_TOKEN }}
34+
publish_dir: ./build
35+
publish_branch: gh-pages

0 commit comments

Comments
 (0)