Skip to content

Commit

Permalink
Merge branch 'hngprojects:dev' into feat/HNG-82-develop-waitlist-form…
Browse files Browse the repository at this point in the history
…-to-add-user
  • Loading branch information
toonami2907 authored Jul 19, 2024
2 parents da13d71 + 6e452fe commit e20200c
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/dev-cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Development CI/CD Pipeline

on:
push:
branches:
- dev
paths-ignore:
- .github/workflows/**

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache npm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install npm
run: npm install -g npm@9

- name: Install dependencies
run: npm install

- name: Lint code
run: npm run lint

- name: Build project
run: npm run build

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to dev environment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
./deploy_dev.sh remix
60 changes: 60 additions & 0 deletions .github/workflows/prod-cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@

name: Production CI/CD Pipeline

on:
push:
branches:
- main
paths-ignore:
- .github/workflows/**

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Cache npm modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install npm
run: npm install -g npm@9

- name: Install dependencies
run: npm install

- name: Lint code
run: npm run lint

- name: Build project
run: npm run build

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Deploy to prod environment
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
./deploy_prod.sh remix

0 comments on commit e20200c

Please sign in to comment.