-
Notifications
You must be signed in to change notification settings - Fork 100
68 lines (68 loc) · 2.02 KB
/
deploy.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
66
67
68
name: Deploy docs to gh-pages
on:
push:
branches:
- master
- v8_maintenance
- v9_maintenance
workflow_dispatch:
jobs:
deploy-release:
if: startsWith(github.event.head_commit.message, 'chore(release)')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node 22
uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci && npm run bootstrap
- name: Set build directory and deployment path based on branch
id: set-build-dir
run: |
echo "::set-output name=build_dir::./packages/__docs__/__build__"
case "${{ github.ref }}" in
"refs/heads/master")
echo "::set-output name=deploy_dir::./"
;;
"refs/heads/v8_maintenance")
echo "::set-output name=deploy_dir::v8"
;;
"refs/heads/v9_maintenance")
echo "::set-output name=deploy_dir::v9"
;;
esac
- name: Build docs-app
run: npm run build:docs
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ${{ steps.set-build-dir.outputs.build_dir }}
branch: gh-pages
target-folder: ${{ steps.set-build-dir.outputs.deploy_dir }}
clean-exclude: |
pr-preview
v7
v8
v9
latest
force: false
deploy-latest:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Install Node 22
uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm ci && npm run bootstrap
- name: Build docs-app
run: npm run build:docs
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./packages/__docs__/__build__
branch: gh-pages
target-folder: latest
force: false