forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.68 KB
/
python_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: Docs
on:
pull_request:
branches:
- master
push:
branches:
- master
# Disabled until docs support versioning per branch/release
# - develop
release:
types: [published] # update Docs upon new release
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.8"
- name: Capture branch and tag
id: branch_name
run: |
echo ::set-env name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo ::set-env name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
- name: Build docs website
run: make build-docs-website
- name: Build docs API reference
# if: env.SOURCE_BRANCH == 'master' # Disabled until docs support versioning per branch/release
run: make build-docs-api
- name: Deploy all docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# Disabled until docs support versioning per branch/release
# - name: Deploy docs website
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./dist
# # when deploying docs website only
# # we need to keep existing API docs checked in
# # but only for dev branch
# keep_files: true
# - name: Deploy all docs
# uses: peaceiris/actions-gh-pages@v3
# if: env.SOURCE_BRANCH == 'master'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./dist