MissionDevOps

Git Actions Tutorial

GitHub Actions allows you to automate workflows for your GitHub projects, such as running tests, deploying code, and much more.

What are GitHub Actions?

GitHub Actions is a CI/CD tool that allows you to automate software workflows directly in your GitHub repository. It uses YAML files to define custom workflows that run on GitHub's servers.

Basic GitHub Actions Workflow

name: CI

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Set up Node.js
        uses: actions/setup-node@v2
        with:
          node-version: '14'
      - name: Install dependencies
        run: npm install
      - name: Run tests
        run: npm test
        
Back: GitHub Next: Terraform