-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from developmentseed/feat/actions
Adds github actions to autobuild book on PR merge to main.
- Loading branch information
Showing
3 changed files
with
67 additions
and
13 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,53 @@ | ||
name: deploy-book | ||
|
||
on: | ||
# Trigger the workflow on push to main branch | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
BASE_URL: /${{ github.event.repository.name }} | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy-book: | ||
runs-on: ubuntu-latest | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
pages: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# Install dependencies | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.11 | ||
cache: 'pip' # cache pip dependencies | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r requirements.txt | ||
# Build the book | ||
- name: Build the book | ||
run: | | ||
jupyter-book build book | ||
# Upload the book's HTML as an artifact | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "_build/html" | ||
|
||
# Deploy the book's HTML to GitHub Pages | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,13 @@ | ||
geopandas==0.10.2 | ||
matplotlib==3.5.1 | ||
numpy==1.21.2 | ||
pandas==1.3.5 | ||
plotly==5.3.1 | ||
pystac-client==1.1.0 | ||
requests==2.26.0 | ||
rasterio==1.2.10 | ||
scikit-image==0.18.3 | ||
scikit-learn==0.24.2 | ||
stackstac==0.4.0 | ||
xarray==0.19.0 | ||
|
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,13 +1 @@ | ||
geopandas==0.10.2 | ||
matplotlib==3.5.1 | ||
numpy==1.21.2 | ||
pandas==1.3.5 | ||
plotly==5.3.1 | ||
pystac-client==1.1.0 | ||
requests==2.26.0 | ||
rasterio==1.2.10 | ||
scikit-image==0.18.3 | ||
scikit-learn==0.24.2 | ||
stackstac==0.4.0 | ||
xarray==0.19.0 | ||
|
||
jupyter-book |