Skip to content

[+] Comment added by Anonymous for Anilovr #3300

[+] Comment added by Anonymous for Anilovr

[+] Comment added by Anonymous for Anilovr #3300

Workflow file for this run

name: Generator
on:
push:
branches: [ main ]
workflow_dispatch:
# One generator at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
actions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build
run: yarn run build
- name: Deploy to GitHub branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy dist --project-name=our-data
- name: Check for document changes, ignoring comments
uses: dorny/paths-filter@v4
id: changes
with:
filters: |
src:
- 'people/**/*[^.json]'
- name: Generate token for cross-repo dispatch
id: generate-token
if: steps.changes.outputs.src == 'true'
uses: actions/create-github-app-token@v3
with:
app-id: ${{ vars.APP_CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: 'one-among-us'
repositories: 'web'
permission-actions: write
- name: Trigger web repackage
uses: actions/github-script@v9
if: steps.changes.outputs.src == 'true'
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'one-among-us',
repo: 'web',
workflow_id: 'package.yml',
ref: 'main'
})