forked from wannier-developers/wannier90
-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (45 loc) · 1.45 KB
/
docs.yml
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
46
47
48
49
name: Deploy docs
on:
release:
types: [published]
jobs:
deploy_docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: git fetch origin gh-pages --depth=1
- run: |
git config user.name github-actions
git config user.email [email protected]
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-w90-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-w90-
- run: pip install -r docs/requirements.txt
# This deploys mkdocs-built html, now we use mike to deploy
# html to have doc versioning.
#
# - run: mkdocs build -s
# working-directory: ./docs
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ENABLE_MKDOCS_GIT_COMMITTERS: True
# - name: Deploy to GitHub Pages
# uses: peaceiris/actions-gh-pages@v3
# if: github.ref == 'refs/heads/develop'
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs/site
- name: mike deploy
run: mike deploy --push --update-aliases ${{ github.ref_name }} latest
working-directory: ./docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ENABLE_MKDOCS_GIT_COMMITTERS: True