-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (41 loc) · 1.53 KB
/
deploy-pages.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: deploy-pages
on:
push:
branches:
- develop
paths:
- docs/**
# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
# Install dependencies
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip install -e ".[docs]"
- name: Make copies of example docs
run: |
mkdir -vp docs/examples
cp -v example_case_folders/05_floris_standin_and_electrolyzer/README.md docs/examples/05_floris_standin_and_electrolyzer.md
cp -v example_case_folders/06_amr_wind_standin_and_battery/README.md docs/examples/06_amr_wind_standin_and_battery.md
cp -v example_case_folders/07_floris_standin_and_solar_pysam/README.md docs/examples/07_floris_standin_and_solar_pysam.md
cp -v example_case_folders/08_floris_standin_only/README.md docs/examples/08_floris_standin_only.md
cp -v example_case_folders/09_heterogeneous_wind/README.md docs/examples/09_heterogeneous_wind.md
ls -l docs/examples
# Build the book
- name: Build the book
working-directory: ${{runner.workspace}}/hercules/docs/
run: |
jupyter-book build .
# Push the book's HTML to github-pages
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html