Skip to content

Deploy to GitHub pages #916

Deploy to GitHub pages

Deploy to GitHub pages #916

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@45bfe0192ca1faeb007ade9deae92b16b8254a0d' # v6.0.0
- uses: 'actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9' # v5.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@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128' # v5.0.0