Skip to content

Cerulean Skyport & Deployment Fixes #318

Cerulean Skyport & Deployment Fixes

Cerulean Skyport & Deployment Fixes #318

Workflow file for this run

name: GitHub Pages
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
workflow_call:
schedule:
# every wednesday at 00:00 UTC
- cron: '0 0 * * 3'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Use Node.js
uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Update npm to latest
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- run: npm -v
- run: npm i --ignore-scripts --no-audit --no-fund --package-lock
- run: npm run build
- run: npm run timestamp
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: npm run sample
- run: ./build/deploy.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: './out'
deploy:
if: ${{ contains(fromJSON('["refs/heads/master", "refs/heads/main"]'), github.ref) }}
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
outputs:
deployment_url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
# internal-only alpha, not available yet: https://github.com/actions/deploy-pages/pull/61
# with:
# preview: ${{ github.event_name == 'pull_request_target' }}