[pre-commit.ci] pre-commit autoupdate #25
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
env: | |
DOCKER_IMAGE: 'registry.gitlab.eox.at/esa/vires_vre_ops/vre-swarm-notebook:0.10.3' | |
jobs: | |
run: | |
name: Build Jupyter Book | |
runs-on: ubuntu-latest | |
steps: | |
- name: Pull docker image | |
run: | | |
echo ${{ secrets.EOX_REGISTRY_PASSWORD }} | docker login -u ${{ secrets.EOX_REGISTRY_USER }} --password-stdin registry.gitlab.eox.at | |
docker pull ${{ env.DOCKER_IMAGE }} | |
- uses: actions/checkout@v2 | |
- name: Execute notebooks and build book | |
run: | | |
docker run -v $GITHUB_WORKSPACE:/home/jovyan -u root \ | |
-e VIRES_TOKEN=${{ secrets.VIRES_TOKEN }} \ | |
${{ env.DOCKER_IMAGE }} \ | |
bash -c \ | |
' | |
export CDF_LIB=/opt/conda/lib && \ | |
viresclient set_token https://vires.services/ows $VIRES_TOKEN && \ | |
viresclient set_default_server https://vires.services/ows && \ | |
pip install jupyter-book==0.12.1 && \ | |
. ./build_book.sh | |
' | |
- name: Deploy preview to Netlify | |
uses: nwtgck/[email protected] | |
with: | |
publish-dir: './_build/html' | |
production-deploy: false | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
deploy-message: "Deploy from GitHub Actions - preview" | |
github-deployment-environment: preview | |
alias: preview-${{ github.event.number }} | |
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: 1 |