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 119d551
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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

- 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: Deploy docs
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git fetch
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct docs mkdocs.yml)" >> "${GITHUB_ENV}"
mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}

0 comments on commit 119d551

Please sign in to comment.