generated from rdilweb/template-docusaurus-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 11
65 lines (60 loc) · 1.63 KB
/
documentation.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Documentation
on:
push:
paths:
- '.github/workflows/documentation.yml'
- 'testsite/**'
- 'src/**'
repository_dispatch:
types: [generate-documentation]
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pull-requests: write
actions: write
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/[email protected]
with:
node-version: "lts/*"
- name: Get yarn cache
id: yarn-cache
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/[email protected]
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-testsite-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-testsite-
- name: Install lib 💻
run: |
npm install
- name: Build lib 🤖
run: |
npm run build
- name: Link lib 🔗
run: |
npm link
- name: Install website 💻
run: |
cd testsite
npm link docusaurus-json-schema-plugin --save
npm install --prefer-dedupe
npm dedupe
- name: Build website 🤖
run: |
cd testsite
yarn build
- name: Deploy
uses: peaceiris/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./testsite/build