-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.2 KB
/
deploy-docs.yml
File metadata and controls
45 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Deploy Docs
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.12
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Setup Docs Deploy
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Deploy docs with Mike
env:
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
echo $latest_tag
mike deploy --update-aliases $latest_tag latest
mike set-default latest
git checkout gh-pages
echo "docs.flow-project.net" > CNAME
git add CNAME
git diff --cached --quiet || git commit -m "Persist CNAME for custom domain"
git push origin gh-pages