Skip to content

Update workflows #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2025
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
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: CI

on:
push:
branches: ['main']
branches:
- main
pull_request:
branches: ['main']
branches:
- main

jobs:
ci:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: CI

on:
push:
branches: ['main']
branches:
- main
pull_request:
branches: ['main']
branches:
- main

jobs:
ci:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ name: Deploy to GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ['main']
branches:
- main
<%_ if (config.includePlayground) { _%>
paths-ignore:
- '<%- config.packagesDir %>playground/**'
<%_ } _%>

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
17 changes: 17 additions & 0 deletions packages/docs/src/why.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,23 @@ For `__TEST__` we replace the value with a simple `true` or `false`, which can b

For `__DEV__` it's a little more complicated, because in some builds we replace it with `!(process.env.NODE_ENV === "production")`. This allows the downstream bundler to make the decision about what mode we're in. We can't use `define` for a complex value like this, so `@rollup/plugin-replace` is used instead.

## `pages.yml`

The file `.github/worksflows/pages.yml` configures the GitHub Pages workflow for the documentation. The exact name of the file is not important, GitHub will run all workflows configured in `.github/workflows`.

The configuration is similar to those found at:

- https://vite.dev/guide/static-deploy.html#github-pages
- https://vitepress.dev/guide/deploy#github-pages

pnpm is enabled in the configuration, but a specific version isn't specified as we're using the `packageManager` option in `package.json`.

The workflow is configured to run on the `main` branch. You'd typically want the documentation to reflect the latest release, so whether `main` is an appropriate choice will depend on your release process.

The [`paths-ignore`](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#onpushpull_requestpull_request_targetpathspaths-ignore) setting can be used to avoid running GitHub Pages for changes that don't impact the documentation. The default configuration will only ignore the playground package. Trying to be really precise about what changes trigger the workflow is error-prone and the small gains usually aren't worth the extra effort.

You'll also need to enable GitHub Pages in the settings for your repo.

## `jiti`

The package `jiti` is included so that ESLint can use a TypeScript configuration file:
Expand Down