Skip to content

Commit 75a95e2

Browse files
authored
Merge pull request #178 from commitizen-tools/171-separete-docs
ci: separate docs from python publishing
2 parents 76ff9c0 + 7e0853c commit 75a95e2

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

.github/workflows/docspublish.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
with:
14+
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
15+
fetch-depth: 0
16+
- name: Set up Python
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: '3.x'
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install -U mkdocs mkdocs-material
23+
- name: Build docs
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
run: |
27+
python -m mkdocs build
28+
- name: Push doc to Github Page
29+
uses: peaceiris/actions-gh-pages@v2
30+
env:
31+
PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
32+
PUBLISH_BRANCH: gh-pages
33+
PUBLISH_DIR: ./site

.github/workflows/pythonpublish.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,10 @@ jobs:
2222
python -m pip install --pre -U poetry mkdocs mkdocs-material
2323
poetry --version
2424
poetry install
25-
- name: Build and publish
25+
- name: Publish
2626
env:
2727
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }}
2828
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3029
run: |
3130
./scripts/publish
32-
poetry run mkdocs build
33-
- name: Push doc to Github Page
34-
uses: peaceiris/actions-gh-pages@v2
35-
env:
36-
PERSONAL_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
37-
PUBLISH_BRANCH: gh-pages
38-
PUBLISH_DIR: ./site
31+

0 commit comments

Comments
 (0)