Skip to content

Commit

Permalink
Adde workflow to deploy documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferjiangkells committed Jul 23, 2024
1 parent 9e8df40 commit fbf0528
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build documentation

on:
pull_request:
branches: [main]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Build the documentation
run: |
pip install -r docs-requirements.txt
mkdocs build
28 changes: 28 additions & 0 deletions .github/workflows/deploy_documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Publish documentation

on:
push:
branches:
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v3
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r docs-requirements.txt
- name: Build documentation
run: mkdocs gh-deploy --force
4 changes: 4 additions & 0 deletions docs-requirements.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs
mkdocs-material
mkdocstrings
mkdocstrings-python

0 comments on commit fbf0528

Please sign in to comment.