Skip to content

Update workflow based on zizmor audit #110

Update workflow based on zizmor audit

Update workflow based on zizmor audit #110

Workflow file for this run

name: Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: '52 18 * * 2'
concurrency:
group: "deploy"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout self
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- name: Checkout scratch-gui
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
repository: TurboWarp/scratch-gui
path: scratch-gui
persist-credentials: false
- name: Setup GitHub Pages
id: pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b
- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20
- name: Build
run: |
cd scratch-gui
npm ci
NODE_ENV=production ROUTING_STYLE=hash npm run build
- name: Patch
run: python3 patch.py
- name: Upload pages artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa
with:
path: ./scratch-gui/build/
retention-days: 30
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e