Merge pull request #221 from NREL/develop #37
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
name: deploy-pages | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
paths: | |
- docs/** | |
# This job installs dependencies, builds the book, and pushes it to `gh-pages` | |
jobs: | |
deploy-book: | |
runs-on: ubuntu-latest | |
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]" | |
# Make a copy of the examples folder within the docs folder | |
- name: Copy examples to docs | |
working-directory: ${{runner.workspace}}/flasc/ | |
run: | | |
rsync -av --mkpath examples_artificial_data/03_energy_ratio/ docs/examples/03_energy_ratio | |
rsync -av --mkpath examples_artificial_data/floris_input_artificial/ docs/examples/floris_input_artificial | |
ls docs/examples | |
# Build the book | |
- name: Build the book | |
working-directory: ${{runner.workspace}}/flasc/docs/ | |
run: | | |
jupyter-book build . | |
# Push the book's HTML to github-pages | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html |