Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
avanbremen committed Feb 16, 2024
1 parent fb72322 commit c0d026b
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish docs

on:
push:
branches:
- main

permissions:
contents: write

jobs:
deploy_docs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Configure Git credentials
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.x
cache: 'pip'
cache-dependency-path: 'requirements.txt'

- name: Create cache id
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV

- name: Cache dependencies
uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install -r ./requirements.txt
- name: Deploy to GitHub Pages
run: mkdocs gh-deploy --force

0 comments on commit c0d026b

Please sign in to comment.