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

Website publishing improvements #165

Merged
merged 16 commits into from
Jan 26, 2023
Merged

Conversation

sbrudz
Copy link
Contributor

@sbrudz sbrudz commented Dec 30, 2022

This PR improves the publishing process for https://justnotsorry.com with the goal of making website updates easier and clearer.

Changes include:

  • Moved all the jekyll site generator code from the gh-pages branch into the site subdirectory
  • Configured gh-pages npm package to deploy the site subdirectory to the gh-pages branch
  • Configured a GitHub actions workflow that will trigger a site deployment when relevant files change
  • Added Dynamic generation of the "List of Warning Phrases" page content based on phrases.json
  • Added a git commit SHA and publication timestamp to the footer of justnotsorry.com
  • Updated ReadMe files to describe new process

@sbrudz sbrudz requested a review from yutingcxiang December 30, 2022 20:05
@sbrudz sbrudz requested a review from jduffy3 January 25, 2023 16:04
@jduffy3
Copy link
Contributor

jduffy3 commented Jan 25, 2023

Had an issue running bundle install locally on my machine:

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.

In Gemfile:
  github-pages was resolved to 219, which depends on
    jekyll-avatar was resolved to 0.7.0, which depends on
      jekyll was resolved to 3.9.0, which depends on
        em-websocket was resolved to 0.5.3, which depends on
          eventmachine

but was able to resolve it with this

https://stackoverflow.com/questions/74196882/cannot-install-jekyll-eventmachine-on-m1-mac

Copy link
Contributor

@jduffy3 jduffy3 left a comment

Choose a reason for hiding this comment

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

Approving but had one question about a file not sure is required.

site/phrases.ejs Outdated Show resolved Hide resolved
@sbrudz
Copy link
Contributor Author

sbrudz commented Jan 25, 2023

Had an issue running bundle install locally on my machine:

An error occurred while installing eventmachine (1.2.7), and Bundler cannot continue.

In Gemfile:
  github-pages was resolved to 219, which depends on
    jekyll-avatar was resolved to 0.7.0, which depends on
      jekyll was resolved to 3.9.0, which depends on
        em-websocket was resolved to 0.5.3, which depends on
          eventmachine

but was able to resolve it with this

https://stackoverflow.com/questions/74196882/cannot-install-jekyll-eventmachine-on-m1-mac

What version of ruby and openssl were you using? I wonder if I should upgrade to ruby 3 since 2.7's EOL is in March.

@jduffy3
Copy link
Contributor

jduffy3 commented Jan 25, 2023

➜  just-not-sorry git:(website-publishing-improvements) ✗ openssl version
LibreSSL 3.3.6

I had to install 2.7 with rvm to start the bundle install

➜  site git:(website-publishing-improvements) ✗ ruby -v
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin22]

However I noticed that locally this updated site/Gemfile.lock locally for me with the following PLATFORM: arm64-darwin-22

@sbrudz
Copy link
Contributor Author

sbrudz commented Jan 25, 2023

I create a new issue for the ruby upgrade: #171

@sbrudz
Copy link
Contributor Author

sbrudz commented Jan 25, 2023

However I noticed that locally this updated site/Gemfile.lock locally for me with the following PLATFORM: arm64-darwin-22

This seems to be fine as the PLATFORM gets updated when bundle install is run on a new platform (per this article). I'll bet you're on OS 13. I'm still on 12.

@jduffy3
Copy link
Contributor

jduffy3 commented Jan 26, 2023

However I noticed that locally this updated site/Gemfile.lock locally for me with the following PLATFORM: arm64-darwin-22

This seems to be fine as the PLATFORM gets updated when bundle install is run on a new platform (per this article). I'll bet you're on OS 13. I'm still on 12.

Yup I'm on 13!

PRs require the nodejs build check to be successful in order to merge. Prior to this change, if we
only changed a file in the `./site` directory for a PR, then the nodejs build wouldn't trigger and
the PR couldn't be merged.
@sbrudz
Copy link
Contributor Author

sbrudz commented Jan 26, 2023

@jduffy3 I added a job to the justnotsorry.com GitHub Action workflow that will run bundle install and perform a test build of the site. It'll only publish once the changes are on the main branch. This should help catch potential issues with the ruby/jekyll configuration during the PR stage.

@sbrudz sbrudz merged commit 956bb6c into main Jan 26, 2023
@sbrudz sbrudz deleted the website-publishing-improvements branch January 26, 2023 17:51
@github-actions
Copy link

🎉 This PR is included in version 2.5.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants