-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add build for mkdocs into github pages
- Loading branch information
Martin Møldrup
committed
Jan 12, 2025
1 parent
aa9ce02
commit 001a063
Showing
8 changed files
with
111 additions
and
10 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,65 @@ | ||
name: Generate documentation and deploy to GitHub pages | ||
on: | ||
# Documentation can be either manually updated or is automatically updated when pushed to main branch | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
# Make sure deploy-pages has necessary permissions to deploy to GitHub Pages | ||
permissions: | ||
pages: write | ||
id-token: write | ||
|
||
# Cancel older deploy workflow when more than one is running | ||
concurrency: | ||
group: pages | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
deploy: | ||
name: Build and deploy documentation site | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deploy.outputs.page_url }} # Output URL after the workflow has finished | ||
steps: | ||
# Checkout repository including submodules | ||
- name: Checkout | ||
id: checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
# Setup Python 3.9 | ||
- name: Setup Python | ||
id: python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
# Install dependencies using Poetry | ||
- uses: Gr1N/setup-poetry@v9 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pypoetry/virtualenvs | ||
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }} | ||
- run: poetry --version | ||
- run: poetry install | ||
|
||
# Build documentation to ./site/ directory | ||
- name: Build Documentation | ||
id: build | ||
run: poetry run mkdocs build | ||
|
||
# Upload artifact from the ./site/ directory using the expected format for GitHub Pages | ||
- name: Upload Artifact | ||
id: upload | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./site/ | ||
|
||
# Use previously uploaded artifact to deploy to GitHub Pages | ||
- name: Deploy | ||
id: deploy | ||
uses: actions/deploy-pages@v4 |
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 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 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 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,7 +1,7 @@ | ||
"""Define the public api for the snappylapy package.""" | ||
import pytest | ||
pytest.register_assert_rewrite("snappylapy.expectation_classes.base_snapshot") | ||
from .snappylapy import Expect, LoadSnapshot | ||
from .fixtures import Expect, LoadSnapshot | ||
|
||
|
||
__all__ = ["Expect", "LoadSnapshot"] |
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 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,4 +1,7 @@ | ||
"""Read-only constants.""" | ||
|
||
SNAPSHOT_DIR_NAME = "__snapshots__" | ||
"""Snapshot directory name.""" | ||
|
||
TEST_RESULTS_DIR_NAME = "__test_results__" | ||
"""Test results directory name.""" |
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