You've already forked torvalds-GuitarPedal
mirror of
https://github.com/torvalds/GuitarPedal.git
synced 2026-06-05 20:51:54 +00:00
Well, that original deployment worked, but it wasn't long before it broke again. It would be good if I knew what the heck I was doing.. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Deploy WebMIDI to GitHub Pages
|
|
|
|
on:
|
|
# Runs on pushes targeting the default branch
|
|
push:
|
|
branches: ["main", "master"]
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
workflow_dispatch:
|
|
|
|
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow only one concurrent deployment
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Generate effects.js
|
|
run: |
|
|
cd Software
|
|
# Run the generation script, outputting to a dummy C header, the real effects.js, and a dummy md
|
|
python3 scripts/gen_effects.py effects/ dummy_map.h WebMIDI/effects.js dummy_map.md
|
|
rm dummy_map.h dummy_map.md
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
# Upload only the WebMIDI directory
|
|
path: './Software/WebMIDI'
|
|
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|