Skip to content

Rerun notebooks with SimPEG v0.25.0 #241

Rerun notebooks with SimPEG v0.25.0

Rerun notebooks with SimPEG v0.25.0 #241

Workflow file for this run

name: Build website
on:
# Build after every push to main
push:
branches:
- main
# Build on every PR
pull_request:
jobs:
# =================
# Build the website
# =================
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '20'
- name: Install MyST
run: |
npm install -g mystmd
- name: Print MyST version
run: myst --version
- name: Build website as static HTML (for PR)
if: github.event_name == 'pull_request'
run: |
echo "Building MyST website without setting BASE_URL"
myst build --html
- name: Build website as static HTML (for deploy)
if: github.event_name != 'pull_request'
run: |
echo "Building MyST website using BASE_URL=" $BASE_URL
myst build --html
env:
BASE_URL: /${{ github.event.repository.name }}
# Store the website as a build artifact so we can deploy it later
# or preview the website in a PR.
- name: Upload HTML website as an artifact
if: success()
uses: actions/upload-artifact@v6
with:
name: html-${{ github.sha }}
path: _build/html
# ==================
# Deploy the website
# ==================
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name != 'pull_request'
steps:
- name: Checkout repo
uses: actions/checkout@v6
# Fetch the built HTML from the build job
- name: Download HTML artifact
uses: actions/download-artifact@v7
with:
name: html-${{ github.sha }}
path: _build/html
- name: Deploy to gh-pages
if: success() && github.event_name != 'pull_request'
# Don't use tags: https://julienrenaux.fr/2019/12/20/github-actions-security-risk/
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
publish_branch: gh-pages
enable_jekyll: false
force_orphan: true