-
Notifications
You must be signed in to change notification settings - Fork 0
chore: consolidate actions workflow #388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request consolidates the GitHub Actions workflows by merging the separate build and deployment workflow into a single workflow file that handles both building and deploying the project. The changes introduce improved security practices, update actions to newer versions, and implement deployment to GitHub Pages using the recommended approach.
- Removed the separate
build-and-deploy.yml
workflow file - Enhanced the main
build.yml
workflow to handle both pull requests and pushes to main branch - Updated to newer action versions and implemented least-privilege permissions with concurrency controls
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
.github/workflows/build.yml | Consolidated workflow that now handles both building and deploying, with updated actions and improved security |
.github/workflows/build-and-deploy.yml | Removed separate deployment workflow file |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# environment: | ||
# name: github-pages | ||
# url: ${{ steps.deployment.outputs.page_url }} |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the commented environment configuration. If this configuration is needed, it should be uncommented and properly configured. Otherwise, it adds unnecessary clutter to the workflow file.
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} |
Copilot uses AI. Check for mistakes.
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
Copilot
AI
Sep 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The deploy step should include a needs
dependency on the upload step to ensure proper sequencing. Consider restructuring this as a separate job that depends on the build job to follow GitHub Pages deployment best practices.
- name: Deploy to GitHub Pages | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
# Removed from build job; will be added as a separate deploy job below. | |
deploy: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: build | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages |
Copilot uses AI. Check for mistakes.
This pull request refactors and consolidates the GitHub Actions workflows for building and deploying the project. The separate build and deployment workflow (
build-and-deploy.yml
) has been removed, and its logic has been merged into the main build workflow (build.yml
). The new workflow also introduces improved deployment practices and updates several actions to their latest versions.Workflow consolidation and deployment improvements:
.github/workflows/build-and-deploy.yml
file, consolidating build and deployment steps into a single workflow..github/workflows/build.yml
to handle both pull requests and pushes tomain
, including deployment to GitHub Pages only on pushes tomain
.actions/checkout@v4
,actions/setup-node@v4
) and replaced the deployment step withactions/deploy-pages@v4
, aligning with recommended practices for GitHub Pages.actions/upload-pages-artifact@v2
and conditionally deploying only when appropriate.