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 73f270d
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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: Fetch changes
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git status
git log -1
git log -1 docs
echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct docs)" >> "${GITHUB_ENV}"
git fetch
- name: Deploy docs
run: |
mike deploy --push --branch gh-pages ${GITHUB_REF_NAME}

0 comments on commit 73f270d

Please sign in to comment.