Skip to content

Pin GitHub Actions to commit SHAs (#506) #85

Pin GitHub Actions to commit SHAs (#506)

Pin GitHub Actions to commit SHAs (#506) #85

Workflow file for this run

name: Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages-${{ github.ref }}"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '24'
cache: 'npm'
cache-dependency-path: 'docs/package-lock.json'
- name: Install dependencies
working-directory: ./docs
run: npm ci --legacy-peer-deps
- name: Build documentation
working-directory: ./docs
run: npm run build
- name: Upload build artifacts
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: ./docs/dist
deploy:
if: github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch'
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@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5