Skip to content

Bump actions/setup-python from 2 to 5 #59

Bump actions/setup-python from 2 to 5

Bump actions/setup-python from 2 to 5 #59

Workflow file for this run

name: Build site
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:
concurrency: build-${{ github.ref }}
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install Python dependencies
run: python -m pip install requests nbconvert nbformat pyyaml
- name: Convert the Jupyter notebooks
run: scripts/render-notebooks
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.89.0"
extended: true
- name: Build
run: hugo
- name: Deploy to production
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.ACCESS_TOKEN }}
external_repository: dfm/dfm.github.com
publish_branch: main
publish_dir: ./public
cname: dfm.io
- name: Deploy to test
if: ${{ github.ref != 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public