File tree Expand file tree Collapse file tree 3 files changed +52
-9
lines changed Expand file tree Collapse file tree 3 files changed +52
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Build
3+ description : Setup to run and run mkdocs
4+ runs :
5+ using : " composite"
6+ steps :
7+ - name : Setup build environment
8+ uses : actions/setup-python@v4
9+ with :
10+ python-version : ' 3.x'
11+ cache : ' pip'
12+ - name : Install build requirements
13+ shell : bash
14+ run : pip install -r requirements.txt
15+ - name : Build docs
16+ shell : bash
17+ run : mkdocs build
Original file line number Diff line number Diff line change 1+ ---
2+ name : " Build docs preview"
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+ - reopened
8+ - synchronize
9+ - closed
10+ concurrency : preview-${{ github.ref }}
11+ permissions :
12+ # Needed to update the preview branch.
13+ contents : write
14+ # Needed to write/maintain the comment
15+ pull-requests : write
16+ jobs :
17+ preview :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout code
21+ uses : actions/checkout@v3
22+ - name : Build docs
23+ uses : ./.github/actions/build
24+ - name : Deploy docs preview
25+ uses : rossjrw/pr-preview-action@v1
26+ with :
27+ source-dir : site
Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7- workflow_dispatch :
87permissions :
98 contents : write
109jobs :
@@ -13,12 +12,12 @@ jobs:
1312 steps :
1413 - name : Checkout code
1514 uses : actions/checkout@v3
16- - name : Setup build environment
17- uses : actions/setup-python@v4
15+ - name : Build docs
16+ uses : ./.github/actions/build
17+ - name : Deploy docs
18+ uses : JamesIves/github-pages-deploy-action@v4
1819 with :
19- python-version : ' 3.x'
20- cache : ' pip'
21- - name : Install build requirements
22- run : pip install -r requirements.txt
23- - name : Build and deploy docs
24- run : mkdocs gh-deploy --force
20+ folder : site
21+ force : false
22+ clean-exclude : |
23+ pr-preview
You can’t perform that action at this time.
0 commit comments