Skip to content
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

[CI] Set up deploy workflow for GitHub pages #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

rmanaem
Copy link
Contributor

@rmanaem rmanaem commented Feb 21, 2025

Checklist

This section is for the PR reviewer

  • PR has an interpretable title with a prefix ([ENH], [FIX], [REF], [TST], [CI], [MNT], [INF], [MODEL], [DOC]) (see our Contributing Guidelines for more info)
  • PR has a label for the release changelog or skip-release (to be applied by maintainers only)
  • PR links to GitHub issue with mention Closes #XXXX
  • Tests pass
  • Checks pass

For new features:

  • Tests have been added

For bug fixes:

  • There is at least one test that would fail under the original bug conditions.

Summary by Sourcery

Sets up a deploy workflow for GitHub pages. This workflow automates the deployment process to GitHub Pages upon the creation of a new release.

CI:

  • Configures a new GitHub Actions workflow to deploy the project to GitHub Pages upon release.

Deployment:

  • Sets up a deployment environment for GitHub Pages, including necessary permissions and concurrency settings.

Copy link

sourcery-ai bot commented Feb 21, 2025

Reviewer's Guide by Sourcery

This pull request introduces a new GitHub Actions workflow (deploy.yaml) to automate the deployment of the Neurobagel application to GitHub Pages. The workflow is triggered on new releases and manual dispatches, sets up necessary permissions, builds the application, and deploys it to the github-pages environment.

No diagrams generated as the changes look simple and do not need a visual representation.

File-Level Changes

Change Details Files
Creation of a new GitHub Actions workflow for deploying the application to GitHub Pages.
  • Configured the workflow to trigger on release (when a new release is published) and workflow_dispatch (manual trigger).
  • Defined necessary permissions for the workflow, including contents: read, pages: write, and id-token: write.
  • Configured concurrency to allow only one deployment at a time, cancelling any in-progress deployments.
  • Defined a deploy job that runs on ubuntu-latest.
  • Added steps to checkout the code, set up Node.js, install dependencies, build the application, configure GitHub Pages, upload the build artifact, and deploy to GitHub Pages.
.github/workflows/deploy.yaml

Assessment against linked issues

Issue Objective Addressed Explanation
#48 Set up a GitHub Pages deployment workflow.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@rmanaem rmanaem added the pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1) label Feb 21, 2025
Copy link

netlify bot commented Feb 21, 2025

Deploy Preview for staging-annotation ready!

Name Link
🔨 Latest commit beb25d2
🔍 Latest deploy log https://app.netlify.com/sites/staging-annotation/deploys/67b8be668fdf590008457fbc
😎 Deploy Preview https://deploy-preview-52--staging-annotation.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.48%. Comparing base (34f7aee) to head (beb25d2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #52   +/-   ##
=======================================
  Coverage   80.48%   80.48%           
=======================================
  Files          17       17           
  Lines         123      123           
  Branches       17       17           
=======================================
  Hits           99       99           
  Misses         24       24           
Flag Coverage Δ
tests 80.48% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@surchs surchs self-requested a review February 21, 2025 21:10
Copy link

@surchs surchs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

🧑‍🍳

Comment on lines +33 to +38
# TODO: Update/uncomment once we have deploy the app to replace the legacy tool
# - name: Add prod scripts
# run: |
# add_script='<script async src="https://w.appzi.io/w.js?token=YVTHd"></script><script defer data-domain="annotate.neurobagel.org" src="https://plausible.neurobagel.org/js/script.js"></script>'
# # Need to use single quotes around sed to avoid ! to be interpreted as a history expansion character
# sed -i 's|<!-- REPLACE_ME_NB_ANNOTATE_HEADER_SCRIPT_REPLACE_ME -->|'"${add_script}"'|' index.html
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-internal Non-user-facing code improvement, will increment patch version when merged (0.0.+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up GitHub pages deployment
2 participants