Skip to content

Commit 82d3402

Browse files
committed
Add docs for pages.yml
1 parent 8fb7ed4 commit 82d3402

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/docs/src/why.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,23 @@ For `__TEST__` we replace the value with a simple `true` or `false`, which can b
8888

8989
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.
9090

91+
## `pages.yml`
92+
93+
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`.
94+
95+
The configuration is similar to those found at:
96+
97+
- https://vite.dev/guide/static-deploy.html#github-pages
98+
- https://vitepress.dev/guide/deploy#github-pages
99+
100+
pnpm is enabled in the configuration, but a specific version isn't specified as we're using the `packageManager` option in `package.json`.
101+
102+
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.
103+
104+
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.
105+
106+
You'll also need to enable GitHub Pages in the settings for your repo.
107+
91108
## `jiti`
92109

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

0 commit comments

Comments
 (0)