-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (60 loc) · 2.32 KB
/
deploy-doc.yaml
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
# Workflow syntax for GitHub Actions
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
# Context and expression syntax for GitHub Actions
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions
# push only, not merge
name: Deploy Doc
on:
pull_request:
types:
- closed
branches:
- dev
jobs:
deploy-doc:
if: ${{ github.event.pull_request.merged == true && github.head_ref == '__release-pkg' }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: ${{ matrix.node-version }}
- uses: actions/setup-java@v3
with:
distribution: "adopt"
java-version: "11"
- name: Install clojure tools
uses: DeLaGuardo/setup-clojure@7.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
cli: latest
bb: latest
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v3
id: yarn-and-maven-cache # use this to check for `cache-hit` (`steps.yarn-and-maven-cache.outputs.cache-hit != 'true'`)
with:
path: |
~/.m2/repository
${{ steps.yarn-cache-dir-path.outputs.dir }}
./.shadow-cljs
key: ${{ runner.os }}-yarn-and-maven-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('./shadow-cljs.edn') }}-${{ hashFiles('./deps.edn') }}
restore-keys: |
${{ runner.os }}-yarn-and-maven-
- run: yarn install --immutable
- run: yarn workspace doc build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
external_repository: Conflux-Chain/fluent-wallet-doc
publish_branch: main
publish_dir: ./websites/doc/build