mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
Update mkdocs and configure docs versioning
This commit is contained in:
38
.github/workflows/documentation.yml
vendored
38
.github/workflows/documentation.yml
vendored
@@ -7,25 +7,25 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flit
|
||||
flit install --deps develop --extras oauth,redis
|
||||
- name: Build
|
||||
run: mkdocs build
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v2.5.0
|
||||
env:
|
||||
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
|
||||
PUBLISH_BRANCH: gh-pages
|
||||
PUBLISH_DIR: ./site
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flit
|
||||
flit install --deps develop --extras oauth,redis
|
||||
- name: Build
|
||||
run: mkdocs build
|
||||
- name: Get tag
|
||||
run: |
|
||||
python -c "from packaging import version; from fastapi_users import __version__; version = version.parse(__version__); print(f'DOCS_VERSION={version.major}.{version.minor}')" >> $GITHUB_ENV
|
||||
- name: Deploy
|
||||
run: |
|
||||
git fetch origin gh-pages --depth=1
|
||||
mike deploy --push --update-aliases ${{ env.DOCS_VERSION }} latest
|
||||
|
||||
Reference in New Issue
Block a user