-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (36 loc) · 1.05 KB
/
publish-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
name: Publish documentation
on:
push:
branches:
- main
- fix-publish-docs
jobs:
publish-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v3
- name: Install Node and NPM
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Install and build
run: |
npm install
npm run build
- name: Build documentation
run: | # need to specify --out so pages links at /{their name} instead of at /docs
cd lib/papi-components
npm run build:docs -- --out papi-components
cd ../papi-dts
npm run build:docs -- --out papi-dts
cd ../../
mkdir docs-for-pages
mv lib/papi-components/papi-components docs-for-pages
mv lib/papi-dts/papi-dts docs-for-pages
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
branch: github-pages
folder: docs-for-pages