-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (35 loc) · 997 Bytes
/
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
name: Build and Deploy
on:
push:
branches:
- latest
- 'v[0-9].[0-9].[0-9x]'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: set latest version path
if: github.ref_name == 'latest'
run: echo VERSIONS_PATH=/ >> $GITHUB_ENV
- name: set old versions path
if: github.ref_name != 'latest'
run: echo VERSIONS_PATH=/versions/${GITHUB_REF_NAME#v}/ >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v3
- name: Install and Build
env:
NODE_OPTIONS: '--openssl-legacy-provider'
run: |
cd docs
npm install
npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.PAGES_ACCESS_TOKEN }}
branch: deploy
folder: docs/.vuepress/dist
target-folder: ${{ env.VERSIONS_PATH }}
clean: true
clean-exclude: |
versions