Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Adds GH Pages Workflow #69

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

johnedquinn
Copy link
Member

@johnedquinn johnedquinn commented Nov 15, 2023

Relevant Issues

  • None

Motivation

The PartiQL Maintainers expressed the desire to make it easier to update the specification and have more tangible impact. As a mechanism for tackling these issues, I wanted to allow the tip-of-head specification to always be rendered.

Description

  • This PR adds a GH Pages Workflow.
    • The head fork has GH Pages set up already. See the live site here.
    • On pushes to main, this will build using docker and place the HTML in the gh-pages branch.
  • This PR also makes a few small changes:
    • We set versions explicitly to ensure that our builds are reproducible -- especially considering the fact that we don't maintain the Gemfile.lock. I ran into build issues because of this.
    • I modified how we perform releases. This matches how we perform releases for other projects such as PLK.
    • I removed the -it flag for running docker interactively -- this is because GH Actions doesn't allow this.
    • I updated how we retrieve the date of publication. I now do it by the last git commit date -- this ensures that when we checkout a tag, we can run it, and it gives us consistent dates.
    • I also updated the section links/anchors. See the documentation here. Now, we can send links to sections easily to each other.

Moving Forward

We will want to update how we perform releases. In my opinion, we need to update the revision numbers, tag, build on the tag, attach the generated HTML/PDF to the release assets, and update the development version.

Other Notes

  • If approved, do NOT merge this for me. I need to enable GH Pages and create a dedicated branch before this workflow runs. I haven't done it yet as I wanted the maintainers' feedback before modifying the repository.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@johnedquinn johnedquinn marked this pull request as ready for review November 15, 2023 22:34
RCHowell
RCHowell previously approved these changes Nov 15, 2023
RCHowell
RCHowell previously approved these changes Nov 16, 2023
Copy link

@am357 am357 left a comment

Choose a reason for hiding this comment

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

Thanks for creating this automation! left two comments.

Rakefile Outdated
version_string = `git describe --tag | cut -d "-" -f 1,2 | tr - .`.chomp
if version_string.empty?
version_string = '0'
# Attempt to grab the date of the latest commit. If unable to, we use the current date.
Copy link

@am357 am357 Nov 16, 2023

Choose a reason for hiding this comment

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

From the Conversation note:

I updated how we retrieve the date of publication. I now do it by the last git commit date -- this ensures that when we checkout a tag, we can run it, and it gives us consistent dates.

I know we have added this to the release process but will there be a situation where the latest commit is not corresponding to a tag, i.e., changes not released yet?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, intentionally. So, when we automatically release to GH pages, it'll grab the tip-of-head's date. However, when we release a version, the exact commit will be tagged. Checking out that commit and running this will always give us the release date matching that of the tagged commit.

Copy link

Choose a reason for hiding this comment

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

Just to clarify further: so the page that we will see in the website is not necessarily the released version? if so, would it make sense to automate the release and as part of that publish for website?

Rakefile Outdated Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants