-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from ebouchut/mkdocs-material-migration
🏗️ 💥 Migrate Site Generator to Mkdocs from Sphinx
- Loading branch information
Showing
124 changed files
with
1,715 additions
and
1,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: publish | ||
|
||
# Controls when the action will run. | ||
on: | ||
# Remark: uncomment one section only | ||
# Remark: Next 1 line requires manual action, Click on action tab, then publish | ||
# workflow_dispatch | ||
# Remark: Next 5 lines triggers the workflow on push events for the main branch | ||
push: | ||
branches: | ||
- dev | ||
paths-ignore: | ||
- "README.md" | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
if: github.repository_owner == 'nightscout' | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Create, Activate and share a Python Virtual Env | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
# Persist venv related variables across the steps below | ||
# See: https://stackoverflow.com/a/74669486/386517 | ||
echo "PATH=$PATH" >> "$GITHUB_ENV" | ||
echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> "$GITHUB_ENV" | ||
- name: Install Python Dependencies | ||
run: pip install -r requirements.txt | ||
|
||
- name: Get Playwright Version (Headless Browser) | ||
run: | | ||
echo "PLAYWRIGHT_VERSION=$(playwright --version | cut -d ' ' -f 2)" >> $GITHUB_ENV | ||
- name: Cache Playwright Binaries | ||
id: playwright | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/ms-playwright | ||
key: playwright-${{ env.PLAYWRIGHT_VERSION }} | ||
|
||
- name: Install Playwright (if not cached) | ||
if: steps.playwright.outputs.cache-hit != 'true' | ||
run: playwright install --with-deps chromium | ||
|
||
- name: Build Website and PDF | ||
run: MKDOCS_EXPORTER_PDF=true mkdocs build | ||
|
||
- name: Push Website to gh-pages Branch | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
# macOS | ||
.DS_Store | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# Python Virtual Environment | ||
venv/ | ||
venv*/ | ||
|
||
# Mkdocs | ||
target/ | ||
/build/ | ||
/site/ | ||
|
||
# JS | ||
node_modules/ | ||
|
||
# Playwright | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sphinx-autobuild | ||
mkdocs-translate |
Oops, something went wrong.