Skip to content

Merge pull request #8 from aashildte/aashildte-test-workflows #85

Merge pull request #8 from aashildte/aashildte-test-workflows

Merge pull request #8 from aashildte/aashildte-test-workflows #85

Workflow file for this run

# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["main", "master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
env:
# Directory that will be published on github pages
PUBLISH_DIR: ./docs/_build/html
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: emimechanicalmodel
environment-file: ./environment.yml
python-version: 3.8
auto-activate-base: false
- name: Install dependencies and build docs
run: |
pip install .
pip install jupyter
pip install jupyter-book
jupyter book build -W docs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: ${{ env.PUBLISH_DIR }}
# Single deploy job since we're just deploying
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1