-
-
Notifications
You must be signed in to change notification settings - Fork 150
57 lines (51 loc) · 1.24 KB
/
gh-pages.yaml
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
name: publish to gh pages
on:
workflow_dispatch:
push:
paths:
- 'docs/**'
- 'site/**'
branches:
- main
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout routr repo
uses: actions/checkout@v4
with:
repository: fonoster/routr
path: routr
ref: gh-pages
- name: Save charts directory
run: |
mkdir -p /tmp/charts
cp -a routr/charts/* /tmp/charts
- name: Checkout current repo
uses: actions/checkout@v4
- name: Installing Node
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Build and populate out directory
run: |
# Create out directories
mkdir -p out/charts out/site-assets
# Build docs
cd docs
npm install
npm run build
cp -a build/* ../out/
cd ..
# Charts directory
cp -a /tmp/charts/* out/charts
# Website assets
cp -a site/assets/* out/site-assets
cp site/index.html out/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DEPLOY_KEY }}
publish_dir: ./out
publish_branch: gh-pages
cname: routr.io