Skip to content

Commit fdeee8e

Browse files
authored
Merge pull request #46 from NREL/deploy-docs
add action to deploy docs
2 parents ca8ff2b + e4f9c35 commit fdeee8e

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: deploy-docs
2+
3+
on:
4+
# Allows you to run this workflow manually from the Actions tab
5+
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
9+
paths:
10+
- docs/**
11+
12+
permissions:
13+
contents: write # needed to push to gh-pages branch
14+
15+
jobs:
16+
deploy-docs:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
# Install dependencies
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.11"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install ".[dev]"
31+
32+
# Build the book
33+
- name: Build the book
34+
working-directory: ${{runner.workspace}}/routee-transit/docs/
35+
run: |
36+
python examples/_convert_examples.py
37+
jupyter-book build .
38+
39+
# Push the book's HTML to github-pages
40+
- name: GitHub Pages action
41+
uses: peaceiris/actions-gh-pages@v3
42+
with:
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
publish_dir: ${{runner.workspace}}/routee-transit/docs/_build/html

0 commit comments

Comments
 (0)