forked from labring/laf
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.33 KB
/
deploy-doc.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
name: deploy docs
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'docs/**'
- '.github/workflows/deploy-doc.yml'
env:
LAF_CI_DOCS_PAT: ${{ secrets.LAF_CI_DOCS_PAT }}
LAF_CI_DOCS_APPID: ${{ secrets.LAF_CI_DOCS_APPID }}
LAF_CI_DOCS_BUCKET_NAME: ${{ secrets.LAF_CI_DOCS_BUCKET_NAME }}
LAF_API_URL: ${{ secrets.LAF_API_URL }}
jobs:
linkCheckerAndDeploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run Install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command in `docs` directory
dir: docs
- name: Run build
uses: borales/actions-yarn@v4
with:
cmd: build # will run `yarn build` command in `docs` directory
dir: docs
- name: Setup laf-cli
run: npm i laf-cli -g
- name: Login laf-cli
run: |
laf user add doc -r ${{ env.LAF_API_URL }}
laf user switch doc
laf login ${{ env.LAF_CI_DOCS_PAT }}
- name: Deploy to laf
working-directory: docs/.vitepress
run: |
laf app init ${{ env.LAF_CI_DOCS_APPID }}
laf storage push -f ${{ env.LAF_CI_DOCS_BUCKET_NAME }} dist/