retypeapp / retype

Retype is an ✨ ultra-high-performance✨ static site generator that builds a website based on simple text files.
https://retype.com
Other
1.02k stars 201 forks source link

Surprising behavior from the Github Action #615

Closed patricklafrance closed 10 months ago

patricklafrance commented 10 months ago

Hello!

We are experiencing a surprising behavior with the Official Retype Github Action that we use to deploy our website to Github Pages.

Our website is still on Retype v3.2.0 as you can see here on our main branch but after we merged a PR (that is not upgrading Retype to v3.3.0) our website now has a breadcrumb.

I am therefore wondering if the Github Action automatically use the latest version of Retype even if the website project is not targeting Retype latest version?

We are using fix versioning:

    "devDependencies": {
        "retypeapp": "3.2.0"
    }

Thank you,

Patrick

geoffreymcgill commented 10 months ago

Retype does not read or otherwise use the package.json file.

In your retype-action.yml file, the Retype build is configured to use the latest release of Retype:

https://github.com/gsoft-inc/wl-web-configs/blob/main/.github/workflows/retype-action.yml#L19

- uses: retypeapp/action-build@latest

Hope this helps.

patricklafrance commented 10 months ago

Oh, I blindly copied the documentation hehe thank you.

Are you aware if there's a way to use the package.json version of retypeapp instead?

For security reason, we usually do not install automatically the latest version of a dependency.

geoffreymcgill commented 10 months ago

You can point to a specific version in the retype-action.yml:

- uses: retypeapp/action-build@v3.2

Even @v3 would work, if you want to limit to minor version releases.

Are you aware if there's a way to use the package.json version of retypeapp instead?

No, nothing built into Retype, but you could create a custom action that read the version from package.json and updated the - uses: retypeapp/action-build@v<version-here> in your retype-action.yml.

Hope this helps.

patricklafrance commented 10 months ago

Thanks for the help, appreciated. We will probably develop a custom action.