-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.01 KB
/
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
name: Docs build and deploy
on: push
env:
NODE_VERSION: "20"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.js 📦
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
check-latest: true
- name: Install and Build 🔧
run: | # Install packages and build the demo project
yarn install
yarn build-docs
- name: Get commit info
shell: bash
run: |
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
- name: Deploy 🚀
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: docs
build_dir: docs
commit_message: "Deploying to docs from ${{ env.sha_short }}"
keep_history: false
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}