-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (43 loc) · 1.7 KB
/
deploy-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
44
45
46
47
48
49
50
name: Deploy docs
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Install and Build
run: |
npm ci
npm run build
npm run build:docs
- name: Deploy dev
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: docs/dev # the folder in gh-pages that will be created/cleaned
clean: true # Automatically remove deleted files from the deploy branch
- name: Find current tag
run: echo "tag=$(git tag --points-at HEAD)" >> $GITHUB_ENV
- name: Deploy tag
if: ${{ startsWith(env.tag, 'v') }}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: docs/${{ env.tag }} # the folder in gh-pages that will be created/cleaned
clean: true # Automatically remove deleted files from the deploy branch
- name: Deploy latest
if: ${{ startsWith(env.tag, 'v') }}
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: docs # The folder the action should deploy.
target-folder: docs/latest # the folder in gh-pages that will be created/cleaned
clean: true # Automatically remove deleted files from the deploy branch