Skip to content

Commit

Permalink
Add workflow for web demo updates off-cycle from releases
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Oct 20, 2024
1 parent 0abfd82 commit e563d95
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/web-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Update Web Demo

on:
workflow_dispatch:
# Allows for manual triggering

jobs:
software:
uses: joeyparrish/kinetoscope/.github/workflows/build-software.yaml@main
with:
ref: ${{ github.ref }}
for-release: true

emulators:
uses: joeyparrish/kinetoscope/.github/workflows/build-emulators.yaml@main
with:
ref: ${{ github.ref }}
for-release: true

prep-web-demo:
needs:
- software
- emulators

name: Prep Web Demo
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
path: source

- name: Pull streamer ROM
uses: actions/download-artifact@v4
with:
name: streamer-rom
path: streamer

- name: Pull Genesis Plus GX for Web
uses: actions/download-artifact@v4
with:
name: genesis-plus-gx-web
path: web

- name: Arrange web demo artifacts
run: |
mv streamer/rom.bin web/kinetoscope-streamer.rom
cp source/emulator-patches/web-demo.html web/index.html
cp source/emulator-patches/gesture-tracker.js web/
- name: Upload GitHub Pages Artifacts
uses: actions/upload-pages-artifact@v3
with:
path: web

pages:
needs:
- prep-web-demo

permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

name: Deploy to GitHub Pages
runs-on: ubuntu-latest

steps:
- uses: actions/deploy-pages@v4
id: deployment

0 comments on commit e563d95

Please sign in to comment.