Skip to content

Commit

Permalink
add missing package
Browse files Browse the repository at this point in the history
  • Loading branch information
dave-connors-3 committed May 31, 2023
1 parent bac7f23 commit 4a8cb99
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material mike
pip install mkdocs-material mike mkdocs-click
- name: Deploy to GitHub Pages
env:
Expand Down
46 changes: 38 additions & 8 deletions .github/workflows/publish-docs-release.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,44 @@
name: Docs
name: Publish MkDocs on Release

on:
workflow_dispatch:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material mike
- run: mkdocs gh-deploy --force
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material mike mkdocs-click
- name: Extract Major and Minor Version
run: |
VERSION_TAG=${{ github.event.release.tag_name }}
VERSION_TAG="${VERSION_TAG#v}" # Remove 'v' prefix if present
MAJOR="${VERSION_TAG%%.*}"
MINOR="${VERSION_TAG#*.}"
MINOR="${MINOR%%.*}"
MAJOR_MINOR_VERSION="${MAJOR}.${MINOR}"
echo "MAJOR_MINOR_VERSION=${MAJOR_MINOR_VERSION}" >> $GITHUB_ENV
- name: Deploy Updated Docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
mike deploy --push --message "Deploy docs for release ${{ github.event.release.tag_name }}" --update-alias $MAJOR_MINOR_VERSION latest
mike set-default --push latest

0 comments on commit 4a8cb99

Please sign in to comment.