Skip to content

Bump step-security/harden-runner from 2.13.3 to 2.14.0 #236

Bump step-security/harden-runner from 2.13.3 to 2.14.0

Bump step-security/harden-runner from 2.13.3 to 2.14.0 #236

Workflow file for this run

name: Publish website
on:
push:
branches:
- main
pull_request:
branches:
- main
paths:
- 'data/**'
- 'docs/**'
- 'notebooks/**'
- 'mkdocs.yml'
- '.github/workflows/publish.yml' # This workflow
workflow_dispatch:
env:
LC_ALL: en_US.UTF-8
defaults:
run:
shell: bash
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
disable-sudo-and-containers: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
files.pythonhosted.org:443
fonts.google.com:443
fonts.gstatic.com:443
github.com:443
objects.githubusercontent.com:443
pypi.org:443
release-assets.githubusercontent.com:443
- name: 'Checkout'
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: 'Setup Pages'
if: ${{ github.event_name != 'pull_request' }}
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- name: 'Setup uv'
uses: astral-sh/setup-uv@ed21f2f24f8dd64503750218de024bcf64c7250a # v7.1.5
with:
python-version: 3.12
enable-cache: false
- name: 'Build website'
run: |
uvx --with 'mkdocs-macros-plugin' --with 'mkdocs-material[imaging]' -- mkdocs build --strict
- name: 'Upload artifact'
if: ${{ github.event_name != 'pull_request' }}
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
with:
path: 'site/' # mkdocs default site_dir
publish:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: "Harden Runner"
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
disable-sudo-and-containers: true
egress-policy: block
allowed-endpoints: |
api.github.com:443
- name: 'Deploy to GitHub Pages'
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5