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

Use GitHub Actions #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Use GitHub Actions #78

wants to merge 2 commits into from

Conversation

kleinreact
Copy link
Member

The PR switches the website build and deployment from Travis to Github Actions using the default template provided by GitHub for deployment of Hugo websites.

The PR also updates to the latest Hugo v0.142.0 introducing the required changes to avoid deprecation warnings.

We already use the same process successfully for https://github.com/clash-lang/clash-formal.org.

Copy link
Member

@martijnbastiaan martijnbastiaan left a comment

Choose a reason for hiding this comment

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

What are you trying to achieve? Was anything wrong with the Netlify integration?

Comment on lines +71 to +74
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK we don't use GitHub pages for clash-lang.io.

Copy link
Member Author

Choose a reason for hiding this comment

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

What are you trying to achieve? Was anything wrong with the Netlify integration?

There was nothing wrong with it in particular. I just found the GitHub Actions Integration much cleaner in terms of maintainability (the travis.yml looks a bit hacked together, to be honest). It worked out of the box for clash-formal.org, even with the latest hugo, so I thought it might be desirable to use it here as well.

Note that this template is completely provided as is by GitHub Pages. The only thing I changed was the version of hugo.

AFAIK we don't use GitHub pages for clash-lang.io.

I have no clue what we use. It's hard to deduce that from the content of the repo.

Copy link
Member

Choose a reason for hiding this comment

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

Oh gotcha, the Travis stuff is unused. We're just using Netlify integration.

@martijnbastiaan
Copy link
Member

@kleinreact I propose just deleting .travis.yml. Everything else is handled by Netlify.

@kleinreact
Copy link
Member Author

@martijnbastiaan How about the Hugo update? Could we ship that one with Netlify as well? I don't have any insights how their integration works.

@martijnbastiaan
Copy link
Member

I can only change the Node version and Ubuntu version in their settings interface. I'll bump it and then it should build with a newer Hugo (the one paired with Ubuntu 24.04?).

@martijnbastiaan
Copy link
Member

In any case: I do think it makes more sense to build with GHA as it gives us tighter control over how we build. However, we do get some very nice features like previews at the moment.

@martijnbastiaan
Copy link
Member

Turns out I don't know what determines the Hugo version.. Have a look: https://app.netlify.com/sites/gifted-fermi-ffd5ae/deploys/67a5cc1580a0580008844f96. It still uses an old Hugo.

@DigitalBrains1
Copy link
Member

However, we do get some very nice features like previews at the moment.

Just brainstorming here. We could create an artifact with the built website in GitHub Actions, and then have a script in that same action that posts a reply on the open PR with a link to the artifact. That way you don't have to click through a bunch of pages to get to the artifact but it would be neatly accessible from the PR.

I don't know if this would work, it's just a thought.

@kleinreact
Copy link
Member Author

However, we do get some very nice features like previews at the moment.

Does anybody use these previews at the moment? I just use a local hugo to check everything, which comes with the least friction in terms of interaction.

In any case: I do think it makes more sense to build with GHA as it gives us tighter control over how we build.

👍

I also consider it to be easier to integrate with other tools and APIs.

@martijnbastiaan
Copy link
Member

Does anybody use these previews at the moment?

Yes!

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

Successfully merging this pull request may close these issues.

3 participants