Skip to content

Merge pull request #25 from github-usman/client-home #28

Merge pull request #25 from github-usman/client-home

Merge pull request #25 from github-usman/client-home #28

Workflow file for this run

name: FRONTEND Continuous Deployment
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0 # Fetch all history for all branches and tags
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "18.x"
- name: Install dependencies
run: |
cd frontend
npm install
- name: Build
run: |
cd frontend
npm run build
- name: Install Netlify CLI
run: npm install -g netlify-cli
- name: Deploy to Netlify
if: github.ref == 'refs/heads/master' # Deploy only on master branch
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{secrets.NETLIFY_SITE_ID}}
run: |
cd frontend
netlify deploy --prod --dir=build --site=${NETLIFY_SITE_ID} --message="Deployed from GitHub Actions"