File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 77 push :
88 branches :
99 - master
10+ - develop
1011
1112jobs :
1213 docs :
@@ -17,10 +18,28 @@ jobs:
1718 uses : actions/setup-python@v1
1819 with :
1920 python-version : " 3.8"
21+ - name : Capture branch and tag
22+ id : branch_name
23+ run : |
24+ echo ::set-env name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
25+ echo ::set-env name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
2026 - name : Build docs website
21- run : make build-docs
22- - name : Deploy docs
27+ run : make build-docs-website
28+ - name : Build docs API reference
29+ if : env.SOURCE_BRANCH == 'master'
30+ run : make build-docs-api
31+ - name : Deploy docs website
2332 uses : peaceiris/actions-gh-pages@v3
2433 with :
2534 github_token : ${{ secrets.GITHUB_TOKEN }}
2635 publish_dir : ./dist
36+ # when deploying docs website only
37+ # we need to keep existing API docs checked in
38+ # but only for dev branch
39+ keep_files : true
40+ - name : Deploy all docs
41+ uses : peaceiris/actions-gh-pages@v3
42+ if : env.SOURCE_BRANCH == 'master'
43+ with :
44+ github_token : ${{ secrets.GITHUB_TOKEN }}
45+ publish_dir : ./dist
Original file line number Diff line number Diff line change @@ -29,16 +29,17 @@ build: pr
2929 poetry run build
3030
3131build-docs :
32- mkdir -p dist/api
3332 @$(MAKE ) build-docs-website
3433 @$(MAKE ) build-docs-api
3534
3635build-docs-api : dev
36+ mkdir -p dist/api
3737 poetry run pdoc --html --output-dir dist/api/ ./aws_lambda_powertools --force
38- mv dist/api/aws_lambda_powertools/* dist/api/
38+ mv -f dist/api/aws_lambda_powertools/* dist/api/
3939 rm -rf dist/api/aws_lambda_powertools
4040
4141build-docs-website : dev-docs
42+ mkdir -p dist
4243 cd docs && npm run build
4344 cp -R docs/public/* dist/
4445
You can’t perform that action at this time.
0 commit comments