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

feat: doc deployment #510

Closed
wants to merge 11 commits into from
Closed

feat: doc deployment #510

wants to merge 11 commits into from

Conversation

r3yc0n1c
Copy link
Contributor

@r3yc0n1c r3yc0n1c commented Jan 15, 2025

fixes #493

Screenshot

image

Summary

  • added github workflow to build and deploy the documentation automatically to the branch gh-pages
  • added version constraints on Jinja2 and Sphinx due to these errors:
    • ImportError: cannot import name 'environmentfilter' from 'jinja2' (solved by using Jinja2<3.1)
    • Sphinx version error: The sphinxcontrib.applehelp extension used by this project needs at least Sphinx v5.0; (solved by using sphinx==5.0.*)
  • added CNAME file to the root directory.

Summary by Sourcery

Set up Sphinx documentation deployment to GitHub Pages on pushes to the master branch.

CI:

  • Deploy Sphinx documentation to GitHub Pages on pushes to the master branch.

Deployment:

  • Deploy the built Sphinx documentation to GitHub Pages.

Copy link
Contributor

sourcery-ai bot commented Jan 15, 2025

Reviewer's Guide by Sourcery

This pull request implements automatic deployment of Sphinx documentation to GitHub Pages when code is pushed to the master branch. It leverages GitHub Actions to build and deploy the documentation. A new GitHub workflow file .github/workflows/deploy.yml is added. This workflow installs required system packages and Python dependencies, builds the documentation using make html, and deploys the generated HTML files to GitHub Pages using peaceiris/actions-gh-pages. A CNAME file is also added.

Sequence diagram for documentation deployment workflow

sequenceDiagram
    participant D as Developer
    participant GH as GitHub
    participant GA as GitHub Actions
    participant GP as GitHub Pages

    D->>GH: Push code to master branch
    GH->>GA: Trigger workflow
    GA->>GA: Check out repository
    GA->>GA: Set up Python 3.11
    GA->>GA: Install system packages
    GA->>GA: Install Python dependencies
    GA->>GA: Build Sphinx documentation
    GA->>GP: Deploy HTML files
    GP->>GP: Update documentation site
Loading

File-Level Changes

Change Details Files
A new GitHub workflow was added to automatically build and deploy the documentation on push to the master branch.
  • Set up Python 3.11
  • Install required system packages like libffi-dev, libssl-dev, etc.
  • Install project dependencies from requirements.txt and Sphinx.
  • Build the documentation using make html.
  • Deploy the built documentation to GitHub Pages using peaceiris/actions-gh-pages action.
  • Use secrets.GITHUB_TOKEN for authentication during deployment.
.github/workflows/deploy.yml
A CNAME file was added.
  • Added CNAME file to the root directory.
CNAME

Assessment against linked issues

Issue Objective Addressed Explanation
#493 Create a GitHub Actions workflow to automatically deploy Sphinx documentation to the gh-pages branch
#493 Configure the deployment to work with a custom subdomain (etickets.eventyay.com)
#493 Set up the necessary configuration for GitHub Pages deployment

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @r3yc0n1c - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider using ubuntu-latest instead of ubuntu-20.04 to ensure you get security updates and newer package versions unless there's a specific reason for pinning the Ubuntu version.
  • The version constraints on Jinja2 (<3.1) and Sphinx (5.0.*) seem restrictive. If there's a specific reason for using these older versions, please document it in the PR description. Otherwise, consider using more flexible version constraints.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟡 Security: 1 issue found
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

@r3yc0n1c Please make a PR against the development branch. At this point of time it also makes more sense to trigger the deployment of the pages when merging into the dev branch.

@mariobehling mariobehling requested a review from norbusan January 16, 2025 03:34
Copy link
Member

@norbusan norbusan left a comment

Choose a reason for hiding this comment

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

LGTM besides the CNAME being unclear

@@ -0,0 +1 @@
etickets.eventyay.com
Copy link
Member

Choose a reason for hiding this comment

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

@mariobehling is this the name we want to use? etickets...?

@hongquan
Copy link
Member

Why this PR wants to merge to "master"?

@r3yc0n1c
Copy link
Contributor Author

@r3yc0n1c Please make a PR against the development branch. At this point of time it also makes more sense to trigger the deployment of the pages when merging into the dev branch.

done!

@mariobehling
Copy link
Member

@r3yc0n1c Still making PR against master branch.

@r3yc0n1c
Copy link
Contributor Author

@r3yc0n1c Still making PR against master branch.

i thought we needed both... the new pr focuses on the development branch only... we can close this one if not required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants