-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a2243e2
commit b97ab98
Showing
3 changed files
with
50 additions
and
39 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,44 @@ | ||
name: tests | ||
|
||
on: | ||
# Trigger the deploy on push to master branch | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# This job deploys the example book | ||
deploy-example-book: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Install CC | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install cookiecutter | ||
# Use default CC | ||
- name: Cookiecutter no GHA | ||
run: | | ||
cookiecutter . --no-input include_github_actions=no | ||
# Install requirements.txt | ||
- name: Install requirements | ||
run: | | ||
pip install -r my_book/requirements.txt | ||
# Build the example book | ||
- name: Build book | ||
run: | | ||
jupyter-book build my_book/my_book/ | ||
# Deploy html to gh-pages | ||
- name: GitHub Pages action | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: my_book/my_book/_build/html |
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 |
---|---|---|
|
@@ -5,6 +5,9 @@ on: | |
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
# This job tests that the CC works | ||
|
@@ -31,40 +34,4 @@ jobs: | |
# Use the CC with no GitHub action file included | ||
- name: Cookiecutter default | ||
run: | | ||
cookiecutter . --no-input --overwrite-if-exists | ||
# This job deploys the example book | ||
deploy-example-book: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
python-version: [3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Install CC | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install cookiecutter | ||
# Use default CC | ||
- name: Cookiecutter no GHA | ||
run: | | ||
cookiecutter . --no-input include_github_actions=no | ||
# Install requirements.txt | ||
- name: Install requirements | ||
run: | | ||
pip install -r my_book/requirements.txt | ||
# Build the example book | ||
- name: Build book | ||
run: | | ||
jupyter-book build my_book/my_book/ | ||
# Deploy html to gh-pages | ||
- name: GitHub Pages action | ||
uses: peaceiris/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: my_book/my_book/_build/html | ||
cookiecutter . --no-input --overwrite-if-exists |
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