Skip to content

Merge pull request #59 from ashishb1052002/main #298

Merge pull request #59 from ashishb1052002/main

Merge pull request #59 from ashishb1052002/main #298

Workflow file for this run

name: Deploy to Netlify on pull requests
on: [push, workflow_dispatch]
env:
node_version: 16.x
jobs:
environment:
name: 🌱 Load Environment
runs-on: ubuntu-latest
steps:
- name: ⚙️ Node.js version used - ${{ env.node_version }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.node_version }}
build:
runs-on: ubuntu-latest
needs: [environment]
steps:
# Checkout repo
- uses: actions/checkout@v2
- name: Prepare
run: npm ci
- name: Install Netlify
run: npm i netlify-cli
- name: Build site
run: npm run build
# Deploy the site with netlify-cli
- name: Deploy Site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: netlify deploy --dir=build --alias=$GITHUB_SHA --message=$GITHUB_SHA