mirror of
https://github.com/MarkusZoppelt/stahl.git
synced 2026-11-27 06:43:49 +01:00
The landing page's door, rendered by its own shader, becomes the app's icon on every platform, the README's logo and the page's favicon. site/render-icons.sh regenerates every size from it.
57 lines
1.4 KiB
YAML
57 lines
1.4 KiB
YAML
name: Pages
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- site/**
|
|
- .github/workflows/pages.yml
|
|
# A new release changes the version and download links on the page.
|
|
workflow_run:
|
|
workflows: [Release]
|
|
types: [completed]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: pages
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
build:
|
|
# The Release workflow also runs on pull requests. Only a tag publishes anything.
|
|
if: >-
|
|
github.event_name != 'workflow_run' ||
|
|
(github.event.workflow_run.event == 'push' && github.event.workflow_run.conclusion == 'success')
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: stamp the latest release into the page
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
tag=$(gh release view --json tagName --jq .tagName)
|
|
sed -i "s/0\.2\.0/${tag#v}/g" site/index.html site/app.js
|
|
|
|
- name: leave out what only builds the page
|
|
run: rm site/render-media.sh site/render-icons.sh site/render-icons.mjs site/media/tour.json
|
|
|
|
- uses: actions/upload-pages-artifact@v5
|
|
with:
|
|
path: site
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
pages: write
|
|
id-token: write
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- id: deployment
|
|
uses: actions/deploy-pages@v5
|