FIX: linting #109
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: build-deploy-site | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
permissions: | |
contents: write | |
# This job installs dependencies, build the website, and pushes it to `gh-pages` | |
jobs: | |
deploy-website: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
# Create environment using micromamba | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: doc/environment.yml | |
environment-name: pyrad-docs | |
cache-downloads: true | |
- name: Install pyart | |
working-directory: ${{github.workspace}}/src/pyart/ | |
run: | | |
pip install . | |
- name: Install pyrad | |
working-directory: ${{github.workspace}}/src/pyrad_proc/ | |
run: | | |
pip install . | |
- name: Run mapping codes | |
working-directory: ${{github.workspace}}/ci/ | |
run: | | |
set -e | |
bash run_all.sh | |
- name: Check mapping Code Result | |
run: | | |
if [ $? -ne 0 ]; then | |
echo "Error: Python code failed" | |
exit 1 | |
fi | |
shell: bash | |
# Build the website | |
- name: Build the site | |
run: | | |
cd doc | |
make html | |
# Push the book's HTML to github-pages | |
- name: GitHub Pages action | |
uses: peaceiris/[email protected] | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: doc/build/html | |
cname: https:/meteoswiss.github.io/pyrad/ |