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: deploy Sphinx Documentation automatically to gh-pages using GitHub Actions #259

Closed
wants to merge 5 commits into from

Conversation

r3yc0n1c
Copy link
Contributor

@r3yc0n1c r3yc0n1c commented Jan 15, 2025

This PR closes/references issue #256. It does so by automating the deployment of Sphinx documentation to the gh-pages branch using GitHub Actions. With this workflow, every update to the documentation triggers a deployment, ensuring that the latest changes are always reflected on GitHub Pages.

How has this been tested?

  • Verified that the GitHub Actions workflow runs without errors and deploys the documentation to the gh-pages branch.
  • Checked that the generated documentation appears correctly on GitHub Pages.
  • Verified that the deployment works with updates to the documentation.

image

Checklist

  • Prepare Your Sphinx Documentation
  • Create the gh-pages Branch
  • Configure Automated Deployment via GitHub Actions
  • Add the Custom Subdomain
  • Configure DNS to point to etalk.eventyay.com
  • Verify the Deployment

Summary by Sourcery

Set up a GitHub Actions workflow to automatically deploy the Sphinx documentation to GitHub Pages on every push to the main branch.

CI:

  • Add a GitHub Actions workflow to deploy the Sphinx documentation to GitHub Pages.

Deployment:

  • Deploy the generated documentation to the gh-pages branch.

Copy link

sourcery-ai bot commented Jan 15, 2025

Reviewer's Guide by Sourcery

This PR automates the deployment of Sphinx documentation to GitHub Pages using a GitHub Actions workflow. The workflow is triggered by pushes to the main branch and builds the documentation using make html before deploying it to the gh-pages branch using the peaceiris/actions-gh-pages action. The workflow also installs the necessary system packages, such as libffi-dev and gettext, and Python dependencies defined in doc/requirements.txt.

Sequence diagram for automated Sphinx documentation deployment

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

    D->>GH: Push changes to main branch
    GH->>GA: Trigger workflow
    activate GA
    GA->>GA: Check out repository
    GA->>GA: Set up Python
    GA->>GA: Install system packages
    GA->>GA: Install Python dependencies
    GA->>GA: Build Sphinx documentation
    GA->>GP: Deploy to gh-pages branch
    deactivate GA
    Note over GP: Documentation live at<br/>etalk.eventyay.com
Loading

File-Level Changes

Change Details Files
A new GitHub Actions workflow file .github/workflows/deploy.yml was created to automate the deployment process.
  • Set up a workflow to trigger on pushes to the main branch.
  • Install Python 3.11 and required system packages.
  • Install project dependencies using pip install -Ur doc/requirements.txt.
  • Build the Sphinx documentation using make html.
  • Deploy the generated HTML documentation to the gh-pages branch using peaceiris/actions-gh-pages action and the GITHUB_TOKEN secret.
  • Configure the workflow to publish the contents of the doc/_build/html directory to GitHub Pages.
.github/workflows/deploy.yml

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.
  • 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

@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 adding pip dependency caching to speed up workflow runs. You can use actions/cache with pip's cache directory to avoid reinstalling packages on every run.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 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 Thanks for the PR. 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.

@r3yc0n1c
Copy link
Contributor Author

@r3yc0n1c Thanks for the PR. 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 mariobehling requested a review from hongquan January 19, 2025 17:39
@mariobehling
Copy link
Member

Not sure what this PR is for as you already have a PR for the dev branch. Dev branches get merged to main or master after thourough testing. Closing this PR therefore.

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.

2 participants