Skip to content

SC-12 - add new events and past hackathon details #8

SC-12 - add new events and past hackathon details

SC-12 - add new events and past hackathon details #8

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main # or your default branch
paths:
- '**.js'
- '**.jsx'
- '**.ts'
- '**.tsx'
- '**.json'
- '**.md'
pull_request:
branches:
- main # or your default branch
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # use the Node.js version suitable for your app
- name: Install dependencies
run: npm install
- name: Run lint
run: npm run lint
test:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # use the Node.js version suitable for your app
- name: Install dependencies
run: npm install
- name: Run tests
run: npm test
build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # use the Node.js version suitable for your app
- name: Install dependencies
run: npm install
- name: Build
env:
NEXT_PUBLIC_SANITY_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_SANITY_PROJECT_ID }}
NEXT_PUBLIC_SANITY_DATASET: ${{ secrets.NEXT_PUBLIC_SANITY_DATASET }}
run: npm run build
# deploy:
# runs-on: ubuntu-latest
# needs: build
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Setup Node.js
# uses: actions/setup-node@v2
# with:
# node-version: '20' # use the Node.js version suitable for your app
# - name: Install dependencies
# run: npm install
# - name: Deploy
# env:
# VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Make sure to add your Vercel token in GitHub secrets
# NEXT_PUBLIC_SANITY_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_SANITY_PROJECT_ID }}
# NEXT_PUBLIC_SANITY_DATASET: ${{ secrets.NEXT_PUBLIC_SANITY_DATASET }}
# run: |
# # Add your deployment command here
# npx vercel --prod