-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add release versioning with mike (#409)
- Loading branch information
1 parent
a2c4e05
commit d75c3ec
Showing
4 changed files
with
72 additions
and
9 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,54 @@ | ||
name: "Build docs and deploy" | ||
on: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
docs: | ||
name: Build Documentation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
lfs: false | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Cache dependency | ||
id: cache-dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/pip | ||
key: ${{ runner.os }}-pip | ||
|
||
- name: Install jaxley and dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[doc] | ||
- name: convert notebooks to markdown | ||
run: | | ||
cd docs | ||
jupyter nbconvert --to markdown ../examples/*.ipynb --output-dir docs/examples/ | ||
jupyter nbconvert --to markdown ../tutorials/*.ipynb --output-dir docs/tutorials/ | ||
- name: Configure Git user for bot | ||
run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
- name: Build and deploy dev documentation upon push to main | ||
if: ${{ github.event_name == 'push' }} | ||
run: | | ||
cd docs | ||
mike deploy dev --push | ||
- name: Build and deploy the lastest documentation upon new release | ||
if: ${{ github.event_name == 'release' }} | ||
run: | | ||
cd docs | ||
mike deploy ${{ github.event.release.name }} latest -u --push |
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,6 +1,4 @@ | ||
# Project specific | ||
/docs/docs/tutorial/* | ||
/docs/docs/examples/* | ||
/docs/site/* | ||
**/.DS_Store | ||
|
||
|
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