Skip to content

Commit

Permalink
CI: Add docs deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
dext0r committed Jul 25, 2023
1 parent 39a979e commit 1dcf621
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy docs

on:
push:
branches:
- v*
- master

permissions:
contents: write

jobs:
docs:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
cache-dependency-path: requirements_dev.txt

- name: Install dependencies
run: pip install -r requirements_dev.txt

- name: Prepare environment
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct docs mkdocs.yml)" >> "${GITHUB_ENV}"
- name: Deploy docs
run: |
mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}
4 changes: 3 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ flake8==3.9.2
flake8-quotes==3.3.0
mkdocs==1.3.0
mkdocs-material==8.3.4
mike==1.1.2

# https://github.com/jimporter/mike/issues/103
mike @ git+https://github.com/jimporter/mike@be1aafe

0 comments on commit 1dcf621

Please sign in to comment.