GitHub Action Hero: Shohei Ueda

Source: GitHub Blog | Author: Brian Douglas

GitHub Actions를 사용하면 알고 있고 사랑하는 도구를 연결하여 더 많은 워크 플로우를 자동화할 수 있어 혁신에 더 많은 시간을 할애할 수 있습니다. 모든 클라우드에 배포하고 컨테이너를 구축하며 오픈 소스 프로젝트에 대한 새로운 사용자를 환영하는 메시지 등을 자동화 할 수 있습니다.

Over the next few weeks, we’re sharing stories from the earliest GitHub Actions adopters to help inspire you. This week, we interviewed Shohei Ueda (@peaceiris), the creator of Hugo setupmdbook Action, and many more Actions. Learn about their project, challenges, and the lessons they’ve learned.

Tell us a little about yourself—how did you get started in software tools?

I’m a computer science major student in Japan, and two years have passed since I started using GitHub. These days, I’m into Static Site Generators, especially Hugo (Fast SSG is written in Golang). My interest in software began when I first set up my blog. I learned about static site generators, and in particular, I found Hugo really appealing. I’ve since realized that GitHub Pages is useful for publishing my blog, which is when I started using GitHub. Now, through my experiences on GitHub and with the community, I’m passionate about open-source software.

Why did you build your GitHub Action?

When GitHub Actions was in beta, I was able to be one of the first beta users. I wanted to automate building and publishing a static site to GitHub Pages using GitHub Actions. To implement that idea on GitHub Actions, I needed to set up Hugo, build a site, create a commit, and push it to a GitHub Pages branch. At that time, no public actions existed for my use case, so I created the Hugo build action and GitHub Pages deploy action. GitHub Actions beta v1 only supported a Docker action, so those two actions were originally Docker actions. Today, the Hugo setup action has migrated to a TypeScript action and the GitHub Pages deploy action is scheduled to be re-implemented in TypeScript, as well. It was a proper decision that separated the two actions, which meant that we can combine the GitHub Pages action with other static site generators.

Do you have future plans for your Actions?

Today, the GitHub Pages action is a Docker action, but I plan on re-implementing it as a TypeScript action. The rest of my GitHub Actions need more tests to raise the quality.

What’s your favorite feature of GitHub Actions?

Action sharing and matrix building are remarkable features of GitHub Actions. With sharing actions, our YAML workflow can be simplified and we can follow best practices easier. The matrix building is also a superior feature for multi-platform testing your public GitHub Actions.

What are the biggest challenges you’ve come across while building your GitHub Action?

The Hugo action was originally published as a Docker action and was migrated to a JavaScript action, before finally being turned into a TypeScript action. At first, I had a problem when creating a new release for each new Hugo version. Hugo has developed actively and a lot of releases are frequently published. This bothered me, but a JavaScript (TypeScript) action resolved it. By implementing our actions with JavaScript or TypeScript, we can run them immediately, but a Docker action needs a building step before being run and it needs to follow a large Node.js ecosystem. Although I didn’t have experience with Node projects, and I was just learning JavaScript and TypeScript, it wasn’t difficult and I was able to write my action easily. JavaScript and TypeScript actions are available on Ubuntu, macOS, and Windows virtual environments, and the actions/toolkit is useful to run your action on many platforms. TypeScript also provides a strict type system that helps our implementation. For these reasons, I strongly recommend anyone to create their Actions using TypeScript.

What do you want everyone to take away from your project(s)?

Please don’t hesitate to share your actions and knowledge. You may not know it, but your learnings will help others all over the world, no matter the length or complexity of your script—that’s the most important point of open source software. Improve your project and software by using GitHub Actions, and thank you for learning more about my work.

We hope you enjoyed our interview with Shohei Ueda. Check back soon—we’ll be adding new interviews every week. If you’re interested in building your own GitHub Actions, get started with the Learning Lab course. You can also find Hugo setup—and hundreds of other GitHub Actions—from GitHub Marketplace.

Don’t forget! The GitHub Hackathon is running now through March 31. Submit your best Actions for some exclusive Actions swag.

Learn more about Github Actions

댓글 남기기