-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (42 loc) · 1.18 KB
/
deploy-docs.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Deploy Duck-UI Docs to GitHub Pages
on:
push:
branches:
- main
paths:
- "docs/**"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
run: |
cd docs
npm ci
- name: Build website
run: |
cd docs
npm run build
# Docusaurus builds to build directory instead of out
- name: Add .nojekyll file
run: touch docs/build/.nojekyll
- name: Create CNAME file
run: echo "duckui.com" > docs/build/CNAME
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GHCR_PAT }}
publish_dir: ./docs/build # Docusaurus outputs to build directory
user_name: ${{ secrets.GIT_USER_NAME }}
user_email: ${{ secrets.GIT_USER_EMAIL }}