mirror of
https://github.com/elder-plinius/P4RS3LT0NGV3.git
synced 2026-02-12 16:52:46 +00:00
GitHub Actions Workflows
deploy.yml - Automated GitHub Pages Deployment
This workflow automatically builds and deploys the project to GitHub Pages whenever changes are pushed to the main or master branch.
What it does:
-
Build Stage:
- Checks out the repository
- Sets up Node.js (v20) with npm cache enabled
- Installs dependencies with
npm ci - Runs test suite with
npm run test:all - Runs
npm run buildwhich:- Copies static files to
dist/(copy-static.js) - Builds transformer index (
build-index.js) - Bundles all transformers to
dist/js/bundles/(build-transforms.js) - Generates emoji data to
dist/js/data/(build-emoji-data.js) - Injects tool scripts (
inject-tool-scripts.js) - Injects tool templates into
dist/index.html(inject-tool-templates.js)
- Copies static files to
- Verifies critical build files exist in
dist/ - Uploads only the
dist/folder as a Pages artifact (7-day retention)
-
Deploy Stage:
- Deploys the
dist/artifact to GitHub Pages - Makes the site available at your GitHub Pages URL
- Deploys the
Manual Deployment
You can also trigger a deployment manually from the GitHub Actions tab by selecting "Build and Deploy to GitHub Pages" and clicking "Run workflow".
Required GitHub Settings
For this workflow to function, ensure GitHub Pages is configured in your repository settings:
- Go to Settings → Pages
- Under Build and deployment:
- Source: GitHub Actions
- Save the settings
The site will be available at: https://<username>.github.io/<repository-name>/
Troubleshooting
- Build fails: Check the Actions tab for error logs
- Tests fail: Run
npm run test:alllocally to debug issues - Missing templates: Ensure all templates exist in
templates/directory - Test locally first: Run
npm run buildbefore pushing to catch errors early - Verify build output: Check that
dist/index.htmland other files exist indist/folder after build - Build timeout: Build has a 10-minute timeout; if it exceeds this, check for infinite loops or large file processing
Workflow Triggers
- Push: Automatically runs on push to
mainormaster - Workflow Dispatch: Can be manually triggered from the Actions tab