-
Notifications
You must be signed in to change notification settings - Fork 24
31 lines (26 loc) · 1023 Bytes
/
deploy.yaml
File metadata and controls
31 lines (26 loc) · 1023 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Deploy Docusaurus site with Yarn
on:
push:
branches:
- master # Change to your default branch if it's different (e.g., master)
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20 # Use a recommended Node.js version (Docusaurus requires >= 18)
cache: 'yarn' # This enables caching of yarn dependencies
- name: Install dependencies
run: yarn install --frozen-lockfile # Installs dependencies using yarn
- name: Build website
run: yarn build # Runs the build command defined in your package.json
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build # The directory where Docusaurus builds the static files
publish_branch: gh-pages # The branch to which the site will be deployed