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

Github Action to automatically publish PRs to GitHub Pages #52

Merged
merged 8 commits into from
Mar 7, 2024

Commits on Mar 6, 2024

  1. Fix make target name

    achabotl committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    90969b5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e9a121 View commit details
    Browse the repository at this point in the history
  3. Remove actions/configure-pages

    AFAIK, we don't need the metadata.
    
    https://github.com/actions/configure-pages/
    achabotl committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    3585718 View commit details
    Browse the repository at this point in the history
  4. Force push (with lease) the gh-pages

    Because we're not keeping the history of the gh-pages branch, we end up
    with a new commit every time. Github refuses that we push that branch
    because it doesn't match the history.
    achabotl committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    e8695dc View commit details
    Browse the repository at this point in the history
  5. Good old --force

    achabotl committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    8ba78f4 View commit details
    Browse the repository at this point in the history
  6. Pass cname when creating the gh-pages

    The docs [1] adds a CNAME file if you're publishing from a branch. But
    since the action wipes the `gh-pages` branch every time, I think the
    CNAME file will go away.
    
    ghp-import has the option to recreate it every time.
    
    [1]: https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain
    achabotl committed Mar 6, 2024
    Configuration menu
    Copy the full SHA
    6ffa9a1 View commit details
    Browse the repository at this point in the history

Commits on Mar 7, 2024

  1. ci: Use GitHub Actions to perform deployment

    * Run on push events to 'main' as the default branch has been renamed from 'master'.
    * Add running the build job on pull_request events to allow testing builds of the
      website in advance.
    * Scope concurrency to the workflow level, which allows for per branch runs to not conflict.
    * Split the workflow into a build and deploy job. In the build job have the built website
      be uploaded as a run artifact. In the deploy job this artifact is then downloaded
      and and deployed to GitHub Pages.
       - For the deploy job, set the permissions to allow for the default GITHUB_TOKEN to perform
         the deployment.
       - Use the github-pages environment as required by GitHub Actions.
       - Run the deploy job on either:
          * push events to main (a merged PR)
          * workflow_dispatch events that happen on any branch, to allow for hotfixing
    matthewfeickert committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    9d6c2dd View commit details
    Browse the repository at this point in the history
  2. Merge pull request #53 from matthewfeickert/ci/use-github-actions-for…

    …-deployment
    
    ci: Use GitHub Actions to perform deployment
    achabotl committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    749a836 View commit details
    Browse the repository at this point in the history