mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2026-03-13 07:49:55 +08:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Update documentation
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "*"
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- 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: Parse tag
|
|
id: version_tag
|
|
uses: battila7/get-version-action@v2
|
|
- name: Deploy
|
|
env:
|
|
DOC_TAG: ${{ steps.version_tag.outputs.major && steps.version_tag.outputs.minor && format('{0}.{1} latest', steps.version_tag.outputs.major, steps.version_tag.outputs.minor) || 'dev' }}
|
|
run: |
|
|
git config user.name fastapi-users-ci
|
|
git config user.email fastapi-users-ci@francoisvoron.com
|
|
git fetch origin gh-pages --depth=1
|
|
mike deploy --push --update-aliases ${{ env.DOC_TAG }}
|