Skip to content

Commit

Permalink
chore: add workflow for CI and deployment of web
Browse files Browse the repository at this point in the history
  • Loading branch information
rajdip-b committed Dec 28, 2023
1 parent 415f21c commit f49b7db
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 6 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches: [main]
paths: ['apps/web/**']
pull_request:
paths: ['apps/web/**']

jobs:
validate:
runs-on: ubuntu-latest
name: Validate

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install packages
run: |
pnpm i
- name: Lint
run: |
pnpm run lint:web
- name: Test
run: |
pnpm run test:web
deploy:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Lint

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install packages
run: |
pnpm i
- name: Build
run: |
pnpm run build:web
- name: Deploy
run: |
pnpm install --global vercel
vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
6 changes: 0 additions & 6 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ts-check

// eslint-disable-next-line @typescript-eslint/no-var-requires
const { composePlugins, withNx } = require('@nx/next')
const path = require('path')

/** @type {import('next').NextConfig} */
Expand All @@ -21,8 +20,3 @@ const nextConfig = {
}

module.exports = nextConfig

const plugins = [
// Add more Next.js plugins to this list if needed.
withNx
]

0 comments on commit f49b7db

Please sign in to comment.