Skip to content

Partially Harden CI (#5563) #911

Partially Harden CI (#5563)

Partially Harden CI (#5563) #911

Workflow file for this run

name: 'Deploy to GitHub pages'
on:
schedule:
# Every day at 20:30 UTC.
- cron: '30 20 * * *'
push:
branches: ['master']
workflow_dispatch:
permissions:
contents: 'read'
pages: 'write'
id-token: 'write'
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
# Build job.
build:
runs-on: 'ubuntu-latest'
if: ${{ github.repository_owner == 'SchemaStore' }}
steps:
- uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
with:
persist-credentials: false
- uses: 'actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f' # v6.3.0
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: './package-lock.json'
- run: 'npm clean-install'
- run: 'node ./cli.js build-website'
- uses: 'actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b' # v5.0.0
- uses: 'actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b' # v4.0.0
with:
path: './website'
# Deployment job.
deploy:
environment:
name: 'github-pages'
url: '${{ steps.deployment.outputs.page_url }}'
runs-on: 'ubuntu-latest'
if: ${{ github.repository_owner == 'SchemaStore' }}
needs: 'build'
steps:
- id: 'deployment'
uses: 'actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e' # v4.0.5