This repository is a static HTML site with automated deployment to GitHub Pages and versioned builds managed via Git tags and GitHub Actions.
- Deploys the current site to the
gh-pages
branch automatically on every push tomain
- Supports selective deployment using
deploy.json
to control which version is published (e.g.,v2.0.0
orlatest
) - Automatically saves versioned builds under
versions/JobPower_<version>/
when a tag is pushed. (No need to manually copy files into theversions/
folder) - Automatically deletes the corresponding
versions/
folder when a version tag is deleted
You can control what version of the site is deployed by editing the deploy.json
file in the root of the repository.
To deploy the latest development files from the root (default behavior):
{
"deploy": "latest"
}
To deploy a specific tagged version, for example v2.0.0, update the file to:
{
"deploy": "v2.0.0"
}
The site is deployed automatically via GitHub Actions whenever:
- You push to the
main
branch - You create or delete a version tag
- You update the
deploy.json
file to change which version is deployed
The deployment system reads the deploy.json
file to determine which version of the site to publish.
- If
"deploy": "latest"
→ the root files are deployed (latest dev state) - If
"deploy": "vX.X.X"
→ the corresponding folder underversions/JobPower_vX.X.X/
is deployed
If the specified version doesn't exist, the deployment gracefully falls back to latest
.
The deployed site is served from the gh-pages
branch.
https://idataVisualizationLab.github.io/JobPower/
The deployment and versioning behavior is defined in:
.github/workflows/deploy.yml
This workflow:
- Creates version folders inside
versions/
on tag push - Deletes corresponding version folders on tag deletion
- Selectively deploys either a specific version or the latest based on
deploy.json
- Pushes the selected version to the
gh-pages
branch for public access
To create a new version (for example, v2.0.0
), use the following commands:
# Ensure your changes are committed and pushed to main first
git tag v2.0.0
git push origin v2.0.0
🚨 Important: Tags must include the
v
prefix (e.g.,v1.0.0
,v2.0.0
) to work correctly with the automated workflow.
- Copy the current project files into versions/JobPower_v2.0.0/
- Commit that folder into the main branch automatically via GitHub Actions
- Redeploy the site to GitHub Pages (excluding the versions/ folder)
- You do not need to manually copy files into the versions/ folder — the GitHub workflow handles it.
To delete a previously created version:
git tag -d v2.0.0
git push origin :refs/tags/v2.0.0
- Trigger a GitHub Action that automatically deletes the folder versions/JobPower_v2.0.0 from the main branch