수동 배포 중단: 2026년 GitHub Actions 5분 가이드

발행: (2026년 1월 8일 오전 01:03 GMT+9)
2 분 소요
원문: Dev.to

Source: Dev.to

If you are still manually running npm test or dragging files onto a server, it’s time for an upgrade. Today we’ll automate your workflow using GitHub Actions.

Create the secret folder

GitHub Actions looks for instructions in a specific hidden folder. In your project root, create this path:

.github/workflows/

Create the configuration file

Inside that folder, create a file named ci.yml. The name itself doesn’t matter, but the file must have a .yml extension.

Add the logic

Paste the following code. This example is for a Node.js project, but the logic works for Python, Go, or Rust too.

name: Super-Fast CI
on: [push, pull_request]  # The triggers

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'

      - name: Install dependencies
        run: npm install

      - name: Run the tests
        run: npm test

Why this works (The Breakdown)

  • on – Specifies when the workflow should run. In 2026 it’s best practice to trigger on both pushes to main and any open pull requests.
  • runs-on – Spins up a fresh Ubuntu virtual machine. You don’t have to manage any servers; GitHub provides the environment.
  • uses – References pre‑built actions. actions/checkout is the most common one; it pulls your code into the VM so subsequent steps can access it.

How to see it in action

  1. Commit the changes:

    git add .
    git commit -m "Add CI pipeline"
  2. Push to GitHub:

    git push origin main
  3. Open your repository on GitHub and click the Actions tab.

  4. You’ll see a yellow spinning circle. When it turns into a green checkmark, your code has been successfully verified.

Pro‑Tip for 2026: Use Copilot

If you’re stuck on a complex workflow (e.g., deploying to AWS or Dockerizing an app), open the GitHub editor and ask Copilot to “Write a GitHub Action to deploy this to Vercel.” It will generate most of the YAML for you.

What’s Next?

In the next part of this series we’ll look at Dockerizing this setup so your environment is identical everywhere.


Tags: #github #devops #automation #webdev #tutorial

Back to Blog

관련 글

더 보기 »

안녕, 뉴비 여기요.

안녕! 나는 다시 S.T.E.M. 분야로 돌아가고 있어. 에너지 시스템, 과학, 기술, 공학, 그리고 수학을 배우는 것을 즐겨. 내가 진행하고 있는 프로젝트 중 하나는...