sqs-admin
sqs-admin copied to clipboard
Consolidate duplicate workflows and serve README on GitHub Pages
The repository contained two workflows triggering on push to main: build.yml for Docker builds and pages.yml for React app deployment. Requirement: single workflow serving README.md on GitHub Pages instead of the React app.
Changes
Consolidated workflows
- Merged pages deployment into
build.yml, deletedpages.yml - Added
workflow_dispatchtrigger for manual runs - Moved concurrency control to job level to prevent blocking Docker builds
README.md deployment
- Converts README.md to HTML using
npx [email protected] - Wraps content in GitHub-style CSS for proper rendering
- Deploys to Pages only on main branch pushes or manual dispatch
Workflow structure
jobs:
docker:
# Builds and pushes Docker images (unchanged)
pages:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
concurrency:
group: "pages"
# Converts README.md → HTML → dist/index.html
deploy-pages:
needs: pages
# Deploys to GitHub Pages
Optimizations
- Standardized to
checkout@v5 - Job-level concurrency prevents Docker/Pages blocking
- npx for marked (no global install overhead)
Original prompt
This repo contains since the last PR merge two workflows to build the pages deployment. I want to have only one workflow and the Readme.md to be served as index.html not the actual react app
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.