|
6 | 6 | workflow_dispatch: {}
|
7 | 7 | jobs:
|
8 | 8 | publish:
|
| 9 | + ######################### |
| 10 | + # Force Github action to run only a single job at a time (based on the group name) |
| 11 | + # This is to prevent "race-condition" in publishing a new version of doc to `gh-pages` (#365) |
| 12 | + ######################### |
| 13 | + concurrency: |
| 14 | + group: on-release-publish |
9 | 15 | runs-on: ubuntu-latest
|
10 |
| - |
11 | 16 | steps:
|
12 | 17 | - name: "Checkout"
|
13 | 18 | uses: actions/checkout@v2
|
14 | 19 | with:
|
15 | 20 | token: ${{ secrets.GH_PUBLISH_TOKEN }}
|
16 | 21 | fetch-depth: 0
|
17 |
| - ######################### |
18 |
| - # Release new version |
19 |
| - ######################### |
| 22 | + ######################### |
| 23 | + # Release new version |
| 24 | + ######################### |
20 | 25 | - name: "Use NodeJS 14"
|
21 | 26 | uses: actions/setup-node@v2
|
22 | 27 | with:
|
|
46 | 51 | npx lerna version --conventional-commits --conventional-prerelease --preid beta --create-release github --force-publish=* --yes
|
47 | 52 | fi
|
48 | 53 | npx lerna publish from-git --no-verify-access --yes
|
49 |
| - ######################### |
50 |
| - # Generate documentation |
51 |
| - ######################### |
| 54 | + ######################### |
| 55 | + # Generate documentation |
| 56 | + ######################### |
52 | 57 | - name: Set up Python
|
53 | 58 |
|
54 | 59 | with:
|
|
73 | 78 | echo "Publishing doc for version: $VERSION"
|
74 | 79 | mkdocs build
|
75 | 80 | mike deploy --push --update-aliases --no-redirect "$VERSION" "$ALIAS"
|
| 81 | + # Once we have agreed on release process, we will also use "main" |
| 82 | + # to track the development version (on main branch). |
| 83 | + # For now, we make it the same as the latest version. |
| 84 | + mike deploy --push --update-aliases --no-redirect "main" "$ALIAS" |
76 | 85 | # Set latest version as a default
|
77 | 86 | mike set-default --push latest
|
78 | 87 | - name: Build API docs
|
|
0 commit comments