@@ -14,16 +14,16 @@ jobs:
14
14
with :
15
15
token : ${{ secrets.GH_PUBLISH_TOKEN }}
16
16
fetch-depth : 0
17
-
17
+ # ########################
18
+ # Release new version
19
+ # ########################
18
20
- name : " Use NodeJS 14"
19
21
uses : actions/setup-node@v2
20
22
with :
21
23
node-version : ' 14'
22
-
23
24
- name : " Setup npm"
24
25
run : |
25
26
npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
26
-
27
27
- name : Install packages
28
28
run : |
29
29
npm ci
46
46
npx lerna version --conventional-commits --conventional-prerelease --preid beta --create-release github --force-publish=* --yes
47
47
fi
48
48
npx lerna publish from-git --no-verify-access --yes
49
+ # ########################
50
+ # Generate documentation
51
+ # ########################
52
+ - name : Set up Python
53
+
54
+ with :
55
+ python-version : ' 3.8'
56
+ - name : Set RELEASE_VERSION env var
57
+ run : |
58
+ RELEASE_VERSION=$(cat packages/commons/package.json | jq '.version' -r)
59
+ echo "RELEASE_VERSION=${RELEASE_VERSION:1}" >> $GITHUB_ENV
60
+ - name : Install doc generation dependencies
61
+ run : |
62
+ pip install --upgrade pip
63
+ pip install -r docs/requirements.txt
64
+ - name : Setup doc deploy
65
+ run : |
66
+ git config --global user.name Docs deploy
67
+ git config --global user.email [email protected]
68
+ - name : Build mkdocs site in "gh-pages" branch and push
69
+ run : |
70
+ rm -rf site
71
+ VERSION="$RELEASE_VERSION"
72
+ ALIAS="latest"
73
+ mkdocs build
74
+ mike deploy --push --update-aliases "$VERSION" "$ALIAS"
75
+ # Set latest version as a default
76
+ mike set-default --push latest
77
+ - name : Build API docs
78
+ run : |
79
+ rm -rf api
80
+ npm run docs-generateApiDoc
81
+ - name : Release API docs to the released version
82
+ uses : peaceiris/actions-gh-pages@v3
83
+ with :
84
+ github_token : ${{ secrets.GITHUB_TOKEN }}
85
+ publish_dir : ./api
86
+ keep_files : true
87
+ destination_dir : ${{ env.RELEASE_VERSION }}/api
88
+ - name : Release API docs to the "latest" version
89
+ uses : peaceiris/actions-gh-pages@v3
90
+ with :
91
+ github_token : ${{ secrets.GITHUB_TOKEN }}
92
+ publish_dir : ./api
93
+ keep_files : true
94
+ destination_dir : latest/api
0 commit comments