Skip to content

Bump actions/configure-pages from 4.0.0 to 5.0.0 #217

Bump actions/configure-pages from 4.0.0 to 5.0.0

Bump actions/configure-pages from 4.0.0 to 5.0.0 #217

Workflow file for this run

name: Build and Deploy Github Pages
on:
# Runs on pushes targeting the default branch
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
deploy_trigger:
description: Force a deployment to pages
default: "false"
required: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python 🐍
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: '**/requirements.txt'
- name: Install dependencies 💁🏻
run: |
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade -r requirements.txt
- name: Build slides 📚
run: |
shopt -s globstar
jupytext --to ipynb ${{ github.workspace }}/**/*.py.md
jupyter nbconvert --execute --allow-errors --to html ${{ github.workspace }}/**/*.py.ipynb
# jupyter nbconvert --to slides ${{ github.workspace }}/slides/**/*-slides.py.ipynb
- name: Setup Ruby 💎
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup Pages
id: pages
uses: actions/[email protected]
- name: Build with Jekyll 🔨
run: bundle exec jekyll build --baseurl ${{ steps.pages.outputs.base_path }} # defaults output to '/_site'
- name: Upload artifact ⬆️
uses: actions/upload-pages-artifact@v3 # This will automatically upload an artifact from the '/_site' directory
# Deployment job
deploy:
if: >
(github.event_name == 'push' && github.event.ref == 'refs/heads/main') ||
(github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_trigger ==
'true')
concurrency:
group: "pages"
cancel-in-progress: true
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
# prebuild-binder:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Code
# uses: actions/checkout@v2
# - name: update jupyter dependencies with repo2docker
# uses: jupyterhub/repo2docker-action@master
# with:
# NO_PUSH: true
# MYBINDERORG_TAG: ${{ github.event.ref }}