This directory contains GitHub workflows for the SveltePlot repository.
This workflow runs the automated test suite for the project on push to main branch and pull requests.
This workflow automatically deploys the main branch documentation to GitHub Pages at the root URL. It runs whenever changes are pushed to the main branch.
This workflow automatically deploys the documentation website to GitHub Pages with a URL path prefixed with "~" and the branch name. This enables reviewing documentation changes for each branch without affecting the main documentation site.
When you push to the main branch:
- The
deploy-main-docs.ymlworkflow is triggered - It builds the documentation site using
pnpm buildwithout a specific base path - Deploys the built files to the root of GitHub Pages
URLs for the main branch deployment:
https://<username-or-org>.github.io/<repo-name>/
When you push to any branch except main:
- The
deploy-docs.ymlworkflow is triggered - It builds the documentation site using
pnpm buildwith a base path set to "~{branch-name}" - Deploys the built files to GitHub Pages under a subfolder with the "~" prefix
URLs for branch deployments will follow this pattern:
https://<username-or-org>.github.io/<repo-name>/~{branch-name}/
The tilde prefix ("~") is used to avoid conflicts with existing directories in the main documentation site.
Before these workflows can function properly, you need to:
-
Enable GitHub Pages for your repository:
- Go to repository Settings > Pages
- Set up GitHub Pages to deploy from GitHub Actions
- Make sure the repository has the necessary permissions (pages: write, id-token: write)
-
No additional credentials are needed as GitHub handles the authentication
Both workflows are configured to use the official GitHub Pages actions:
actions/configure-pagesactions/upload-pages-artifactactions/deploy-pages
These actions handle the upload and deployment to GitHub Pages automatically.
- Branches with slashes in their names (e.g.,
feature/new-chart) will have the slashes replaced with hyphens in the deployment path (e.g.,~feature-new-chart) - The
~prefix in the URL helps ensure that branch deployments don't conflict with directories in the main documentation site
If the deployment fails, check:
- GitHub Pages is enabled for your repository
- The repository has the correct permissions configured in the workflow file
- Your branch name doesn't contain any special characters that could cause path issues