-
I had seen some project using it, but could not remember which project. To use it in a github action, should I need to supply github token or something like that ? I have written a draft, but I am sure this will fail. name: Documentation
on:
push:
branches:
- main
paths:
- docs
- README.md
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: aahnik/setup-pyproject@main
- name: Build Docs
run: poetry run mkdocs build -f
- name: Publish docs
run: poetry run mkdocs gh-deploy
|
Beta Was this translation helpful? Give feedback.
Answered by
aahnik
Apr 18, 2021
Replies: 2 comments 9 replies
-
This should work, but I can't guarantee it name: Documentation
on:
push:
branches:
- main
paths:
- docs
- README.md
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install mkdocs
run: pip install mkdocs
- name: Publish docs
run: poetry run mkdocs gh-deploy |
Beta Was this translation helpful? Give feedback.
8 replies
-
Thanks @Andre601 for help. After little bit of testing, I made it. name: Documentation
on:
push:
branches:
- main
paths:
- "**.md"
- "mkdocs.yml"
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
- run: pip install --upgrade pip && pip install mkdocs mkdocs-gen-files
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Publish docs
run: mkdocs gh-deploy See also: #2370 and actions/checkout#479 (comment) and fetch-depth:0 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
aahnik
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @Andre601 for help. After little bit of testing, I made it.
See also: #2370 and actions/checkout#479 (comment) and fetch-depth:0