- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
feat: add GitHub Pages deployment workflow #11
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
- Add GitHub Actions workflow to deploy protocol to GitHub Pages - Support automatic deployment on push to main branch or version tags - Enable manual deployment with specific branch/tag/commit - Integrate with reproschema-ui for web-based protocol display - Update README with comprehensive deployment instructions - Use slugified protocol name for valid GitHub Pages URLs The workflow builds reproschema-ui and configures it to serve the protocol, with the deployed version shown in the banner for clarity.
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.
Summary of Changes
Hello @yibeichan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a significant enhancement by adding an automated GitHub Pages deployment workflow to the reproschema-protocol-cookiecutter template. This enables projects generated from the template to be easily deployed as interactive web applications using reproschema-ui, streamlining the process of sharing and interacting with protocols.
Highlights
- Automated GitHub Pages Deployment: A new GitHub Actions workflow (
.github/workflows/deploy-gh-pages.yml) has been added to automatically build and deployreproschema-uiwith the generated protocol to GitHub Pages, enabling interactive web application deployment. - Flexible Deployment Triggers: The deployment workflow is configured to trigger automatically on pushes to the 
mainbranch and on the creation of version tags (e.g.,v1.0.0). It also supports manualworkflow_dispatchevents, allowing users to deploy specific branches, tags, or commits. - Dynamic 
reproschema-uiConfiguration: The workflow dynamically clones, builds, and configuresreproschema-uiby copying the generated protocol files into its distribution and generating a customconfig.jsfile. This configuration includes the protocol's source, contact information, and a banner indicating the deployed version. - Comprehensive Documentation Updates: The 
README.mdhas been updated with a new section providing clear, step-by-step instructions on how to enable GitHub Pages for the generated repository, how deployments are triggered, and how to access the deployed protocol. - Improved URL Handling: The deployment configuration and 
README.mdnow correctly utilize aslugifyfilter for the protocol name in URLs, ensuring valid and clean GitHub Pages paths. 
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description | 
|---|---|---|
| Code Review | /gemini review | 
Performs a code review for the current pull request in its current state. | 
| Pull Request Summary | /gemini summary | 
Provides a summary of the current pull request in its current state. | 
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. | 
| Help | /gemini help | 
Displays a list of available commands. | 
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
- 
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
 
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.
Code Review
This pull request introduces a GitHub Actions workflow to automatically build and deploy protocols to GitHub Pages. The changes also include updated documentation in the README.
The review focuses on improving the robustness and correctness of the new workflow. Key suggestions include:
- Pinning the 
reproschema-uidependency to a specific version to ensure build stability. - Using 
slugifyfor the protocol name in generated URLs to handle names with spaces correctly. - Adjusting the concurrency settings to align with best practices for GitHub Pages deployments.
 - Using 
npm cifor faster and more reliable dependency installation. 
        
          
                {{cookiecutter.protocol_name}}/.github/workflows/deploy-gh-pages.yml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                {{cookiecutter.protocol_name}}/.github/workflows/deploy-gh-pages.yml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                {{cookiecutter.protocol_name}}/.github/workflows/deploy-gh-pages.yml
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                {{cookiecutter.protocol_name}}/.github/workflows/deploy-gh-pages.yml
              
                Outdated
          
            Show resolved
            Hide resolved
        
      - Pin reproschema-ui to commit 9f7b6b961cdcb516531bbbf1bf1b74648089d04a - Ensures reproducible builds and prevents unexpected failures - Addresses security concern raised in PR review
- Apply slugify filter to protocol_name in githubSrc and banner URLs - Ensures valid URLs when protocol names contain spaces or special characters - Consistent with README.md URL handling
- Change cancel-in-progress from false to true in concurrency settings - Ensures only the latest commit is deployed by cancelling older deployments - Follows GitHub Pages deployment best practices - Saves runner minutes and avoids deploying outdated code
- Replace npm install with npm ci in the build step - Provides faster, more reliable builds using package-lock.json - Ensures exact dependency versions are used consistently - Follows CI/CD best practices for reproducible builds
Summary
This PR adds automatic GitHub Pages deployment functionality to the reproschema-protocol-cookiecutter template. Generated protocols can now be easily deployed as interactive web applications using reproschema-ui.
Features Added
1. GitHub Actions Workflow
.github/workflows/deploy-gh-pages.ymlmainbranchv*)2. Documentation Updates
Technical Details
{% raw %}tags to properly escape GitHub Actions expressionsTesting
Related Issues
This PR builds on top of #10 (which has been merged) and provides the deployment capability requested in the original discussion.
Next Steps
Users can now:
https://<org>.github.io/<protocol-name>