yous / whiteglass-template

Template site for whiteglass theme
https://yous.github.io/whiteglass-template/
7 stars 4 forks source link

Update main.yml in GitHub Actions to Fix Deployment Error Due to Outdated Rubygems Version #4

Open Antropath opened 6 months ago

Antropath commented 6 months ago

Issue Description

When following the README instructions to set up the whiteglass-template, the deployment fails in GitHub Actions with an error related to an outdated Rubygems version. The error message is as follows:

sass-embedded-1.63.6-x86_64-linux-musl requires rubygems version >= 3.3.22, which is incompatible with the current version, 3.1.6

Root Cause

This issue arises from an outdated main.yml workflow file which does not accommodate the newer Rubygems version requirements as specified by sass-embedded. A recent update to the Jekyll documentation (PR #9426) provides a method to create a compliant GitHub Actions workflow.

Recommended Actions

To resolve this issue, I propose the following options for updating the workflow:

  1. Remove the outdated main.yml file.
  2. Update the workflow setup:
    • Option 2a: Direct users to the updated official Jekyll documentation to manually set up the required workflow via the GitHub UI.
    • Option 2b: Include a new workflow YAML file in the template, ensuring it stays current with upstream changes and reduces setup complexity for new users.

Given the purpose of templates to reduce setup effort, I recommend going with Option 2b. However, I am open to feedback or alternative suggestions.

Next Steps

Please advise on which option you prefer, or if there is another approach you would consider. I am happy to assist in implementing the changes once a decision is made.

Thank you for considering this issue. Looking forward to your input.

yous commented 6 months ago

Hi, thanks for the report. Actually the .github/workflows/main.yml got updated quite recently, so it'll work if you copy the content of current HEAD. The content is almost the same with default Jekyll workflow, so the both will work if you delete the original file and add Jekyll workflow, or replace with the current HEAD's main.yml.

I didn't know that we can use $default-branch, so I'll use it for on.push.branches, and get some comments from Jekyll workflow.

yous commented 6 months ago

Oh, $default-branch is replaced when we setup a workflow using GitHub UI. https://github.com/actions/starter-workflows/blob/main/README.md#variables

Then I'll just add comments.