Skip to content

Deploy to GitHub Pages #49

Deploy to GitHub Pages

Deploy to GitHub Pages #49

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
paths:
- 'content/**/*.json'
- 'templates/**'
- 'site/**'
workflow_run:
workflows: ['Build Generator JAR']
types: [completed]
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '25'
- uses: ./.github/actions/build-generator
- name: Generate HTML pages and snippets.json
run: java -XX:AOTCache=html-generators/generate.aot -jar html-generators/generate.jar
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: site
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4