Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Copilot Setup Steps

on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
- package.json
- package-lock.json
- .npmrc
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
- package.json
- package-lock.json
- .npmrc

jobs:
copilot-setup-steps:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 26
cache: npm

- name: Install dependencies
run: npm ci
73 changes: 68 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ on:
repository_dispatch:
types: [nightly-release]

permissions:
contents: write
pages: write
id-token: write
permissions: {}

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
update-nightly-metadata:
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
permissions:
contents: write
Comment on lines +20 to +21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented in 5ba8e46. The workflow now isolates nightly metadata update/commit into a repository_dispatch-only write-scoped job, while build jobs run with read-only repository permissions and separate dispatch/non-dispatch paths.

steps:
- name: Checkout repository
uses: actions/checkout@v7
Expand Down Expand Up @@ -52,6 +52,23 @@ jobs:
git commit -m "Update nightly download to v${RELEASE_VERSION} NB ${RELEASE_BUILD}"
git push origin HEAD:svelteKit

build-nightly:
needs: update-nightly-metadata
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: svelteKit

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 26

- name: Install dependencies
run: npm ci

Expand All @@ -63,9 +80,55 @@ jobs:
with:
path: build/

build:
if: github.event_name != 'repository_dispatch'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
ref: svelteKit

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: 26

- name: Install dependencies
run: npm ci

- name: Build the SvelteKit site
run: npm run build

- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: build/

deploy-nightly:
needs: build-nightly
if: github.event_name == 'repository_dispatch'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5

deploy:
needs: build
if: github.event_name != 'repository_dispatch'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
Loading