Magic of Github Actions: The super-awesome CI/CD

Github Actions: Automate your workflow from idea to production

A Very Simple Example

CI/CD: Build -> Test -> Deploy
CI/CD: Build -> Test -> Deploy

Configuring Auto build and Deployment with Github Actions

name: my-ci-cd

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: 12

- name: Build React App
run: |
npm install # Install Dependencies
CI=false npm run build # CI=false to ignore warnings

- name: Install Surge
run: npm install -g surge

- name: Deploy to Surge
run: surge ./build ${{secrets.SURGE_DOMAIN}} --token ${{secrets.SURGE_TOKEN}}

Explanation:

Summarizing Github Actions

<A code who loves to code/>