Update GitHub Actions #281
Workflow file for this run
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: docs-build | |
on: | |
pull_request: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
python-version: "3.10" | |
- name: Bash | |
shell: bash -el {0} | |
run: | | |
conda info | |
conda list | |
- name: Install GDAL | |
run: | | |
conda install -c conda-forge gdal pyproj --yes | |
- name: Test GDAL installation | |
run: | | |
python -c "from osgeo import gdal" | |
gdalinfo --version | |
- name: Install dependencies | |
run: | | |
pip install --no-cache-dir Cython PyYAML==6.0.1 | |
pip install -r requirements.txt -r requirements_dev.txt | |
pip install . | |
- name: Discover typos with codespell | |
run: codespell --skip="*.csv,*.geojson,*.json,*.js,*.html,*cff,*.pdf" --ignore-words-list="aci,acount,acounts,fallow,hart,hist,nd,ned,ois,wqs" | |
- name: PKG-TEST | |
run: | | |
python -m unittest discover tests/ | |
env: | |
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }} | |
- run: pip install -r requirements_docs.txt | |
- run: mkdocs build | |
env: | |
USE_FOLIUM: ${{ secrets.USE_FOLIUM }} | |
USE_MKDOCS: ${{ secrets.USE_MKDOCS }} | |
HEREMAPS_API_KEY: ${{ secrets.HEREMAPS_API_KEY }} | |
DP_TOKEN: ${{ secrets.DP_TOKEN }} | |
PLANET_API_KEY: ${{ secrets.PLANET_API_KEY }} | |
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} | |
- name: Deploy to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: "./site" | |
production-branch: master | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions" | |
enable-pull-request-comment: true | |
enable-commit-comment: false | |
overwrites-pull-request-comment: true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
timeout-minutes: 10 |