Skip to content

Build(deps): Bump follow-redirects from 1.15.3 to 1.15.4 in /backend #8

Build(deps): Bump follow-redirects from 1.15.3 to 1.15.4 in /backend

Build(deps): Bump follow-redirects from 1.15.3 to 1.15.4 in /backend #8

Workflow file for this run

name: CI Pipeline
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
backend-job:
name: ExpressJS Backend
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js v19
uses: actions/setup-node@v4
with:
node-version: 19.x
cache: "npm"
cache-dependency-path: 'backend/package-lock.json'
- name: Install Dependencies
run: npm ci --legacy-peer-deps
working-directory: ./backend
- name: Prisma Generate
run: npx prisma generate
working-directory: ./backend
- name: Build
run: npm run build
working-directory: ./backend
- name: Lint
run: npm run lint
working-directory: ./backend
- name: Run Tests
run: npm test
working-directory: ./backend
frontend-job:
name: ReactJS Frontend
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js v19
uses: actions/setup-node@v4
with:
node-version: 19.x
cache: "npm"
cache-dependency-path: 'frontend/package-lock.json'
- name: Install Dependencies
run: npm ci
working-directory: ./frontend
- name: Build
run: npm run build
working-directory: ./frontend
- name: Lint
run: npm run lint
working-directory: ./frontend
- name: Run Tests
run: npm test
working-directory: ./frontend
deploy-job:
name: Deploy to Server
needs: [ backend-job, frontend-job]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Deploy to Server
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p $PORT $HOST >> ~/.ssh/known_hosts
ssh -p $PORT $USERNAME@$HOST '~/deploy_script.sh'
lighthouse-job:
name: Lighthouse Audit
runs-on: ubuntu-latest
needs: [frontend-job, deploy-job]
steps:
- uses: actions/checkout@v3
- name: Audit URLs using Lighthouse
uses: treosh/lighthouse-ci-action@v10
with:
urls: |
${{ secrets.APP_URL }}
budgetPath: ./budget.json # test performance budgets
uploadArtifacts: true # save results as an action artifacts
temporaryPublicStorage: true # upload lighthouse report to the temporary storage