Skip to content

Merge pull request #37 from wellcomecollection/upgrade-everything #25

Merge pull request #37 from wellcomecollection/upgrade-everything

Merge pull request #37 from wellcomecollection/upgrade-everything #25

Workflow file for this run

name: "Deploy to GitHub Pages"
on:
push:
branches:
- main
jobs:
build:
name: Build documentation
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Convert Notebooks
run: scripts/convert_notebooks.sh
- name: Commit update
run: |
git config --global user.name 'WeCo bot'
git config --global user.email '[email protected]'
git commit -am "Update notebooks" || exit 0
git push
- name: Install Node
# https://github.com/actions/setup-node?tab=readme-ov-file#usage
# The node-version input is optional. If not supplied, the node version from PATH will be used.
# However, it is recommended to always specify Node.js version and don't rely on the system one.
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build website
run: yarn build
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4