-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (52 loc) · 1.86 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
51
52
53
54
55
name: deploy-docs
on:
workflow_call:
workflow_dispatch:
inputs:
name:
env:
CARGO_TERM_COLOR: always
DOCS_NAME: ${{ inputs.name || github.ref.name }}
PUBLIC_DOCS_DIR: /Users/rohan/Downloads/substrate_docs_public
jobs:
deploy-api-docs:
name: Deploy API documentation
runs-on: bwrc
environment: docs
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@ddcac349402ef55840d9870785f4df1890768078
- run: just build
working-directory: docs/api
- run: |
rm -rf ${{ env.PUBLIC_DOCS_DIR }}/api/${{ inputs.name || github.ref_name }} && |
cp -r target/doc ${{ env.PUBLIC_DOCS_DIR }}/api/${{ inputs.name || github.ref_name }}
working-directory: docs/api
- run: flyctl deploy --remote-only --detach
working-directory: ${{ env.PUBLIC_DOCS_DIR }}/api
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_API }}
deploy-docs:
name: Deploy documentation
runs-on: bwrc
environment: docs
steps:
- uses: actions/checkout@v3
- uses: superfly/flyctl-actions/setup-flyctl@master
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: docs/docusaurus/yarn.lock
- run: yarn install
working-directory: docs/docusaurus
- run: yarn build
working-directory: docs/docusaurus
- run: |
rm -rf ${{ env.PUBLIC_DOCS_DIR }}/docusaurus/branch/${{ inputs.name || github.ref_name }} && |
cp -r target/doc ${{ env.PUBLIC_DOCS_DIR }}/docusaurus/branch/${{ inputs.name || github.ref_name }}
working-directory: docs/docusaurus
- run: flyctl deploy --remote-only --detach
working-directory: ${{ env.PUBLIC_DOCS_DIR }}/docusaurus
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN_DOCS }}