Skip to content

Add SvelteKit workflow and properties for GitHub Pages deployment#3205

Open
Donny-C-1 wants to merge 1 commit intoactions:mainfrom
Donny-C-1:main
Open

Add SvelteKit workflow and properties for GitHub Pages deployment#3205
Donny-C-1 wants to merge 1 commit intoactions:mainfrom
Donny-C-1:main

Conversation

@Donny-C-1
Copy link
Copy Markdown

Description

This PR adds a dedicated starter workflow for SvelteKit projects deploying to GitHub Pages. Currently, SvelteKit users often have to manually adapt generic Node.js or Next.js workflows, which leads to common pitfalls regarding adapter-static and build output directories.

Key Features

  • Auto-Detection: Detects npm vs yarn based on lockfiles.
  • Fail-Fast Validation: Includes a pre-check to ensure @sveltejs/adapter-static is installed, preventing confusing build failures.
  • Optimized Caching: Uses actions/setup-node caching for faster dependency resolution.
  • Dynamic Base Path: Passes the repository name as BASE_PATH to handle SvelteKit's routing in project-site subfolders.

Testing

  • Verified build output on a standard SvelteKit skeleton project.
  • Tested npm ci and yarn install pathways.
  • Confirmed successful deployment using the actions/deploy-pages action.

Tasks

For all workflows, the workflow:

  • Should be contained in a .yml file with the language or platform as its filename, in lower, kebab-cased format (for example, docker-image.yml). Special characters should be removed or replaced with words as appropriate (for example, "dotnet" instead of ".NET").
  • Should use sentence case for the names of workflows and steps (for example, "Run tests").
  • Should be named only by the name of the language or platform (for example, "Go", not "Go CI" or "Go Build").
  • Should include comments in the workflow for any parts that are not obvious or could use clarification.
  • Should specify least privileged permissions for GITHUB_TOKEN so that the workflow runs successfully.

@Donny-C-1 Donny-C-1 requested review from a team as code owners February 13, 2026 13:32
Copy link
Copy Markdown

@Montiwa11 Montiwa11 left a comment

Choose a reason for hiding this comment

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

@ev-max2024
Copy link
Copy Markdown

validate-dataExpected — Waiting for status to be reported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants