-
-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/nodemailer
- Loading branch information
Showing
12 changed files
with
137 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
on: | ||
push: | ||
paths: ['apps/web/**', '.github/workflows/web.yaml'] | ||
pull_request: | ||
paths: ['apps/web/**'] | ||
|
||
jobs: | ||
validate: | ||
runs-on: ubuntu-latest | ||
name: Validate | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Install packages | ||
run: | | ||
pnpm i | ||
- name: Lint | ||
run: | | ||
pnpm run lint:web | ||
- name: Test | ||
run: | | ||
pnpm run test:web | ||
build: | ||
needs: validate | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
name: Build and push docker image | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build Docker image | ||
run: docker build -t keyshade/keyshade-web:latest -f Dockerfile-web . | ||
|
||
- name: Push Docker image | ||
run: docker push keyshade/keyshade-web | ||
|
||
deploy: | ||
needs: build | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
name: Deploy to Render | ||
|
||
steps: | ||
- name: deploy | ||
run: curl ${{ secrets.RENDER_WEB_DEPLOY_HOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM node:20-alpine as build | ||
|
||
WORKDIR /app | ||
|
||
RUN npm i -g pnpm | ||
|
||
COPY package.json . | ||
COPY tsconfig.base.json . | ||
|
||
RUN pnpm install | ||
|
||
COPY apps/web apps/web | ||
|
||
RUN pnpm run build:web | ||
|
||
EXPOSE 3000 | ||
|
||
ENTRYPOINT ["pnpm", "run", "start:web"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,33 @@ | ||
//@ts-check | ||
const { composePlugins, withNx } = require('@nx/next') | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
const path = require('path') | ||
|
||
/** @type {import('next').NextConfig} */ | ||
/** | ||
* @type {import('@nx/next/plugins/with-nx').WithNxOptions} | ||
**/ | ||
const nextConfig = { | ||
distDir: 'dist/.next', | ||
webpack(config, { isServer }) { | ||
config.module.rules.push({ | ||
test: /\.svg$/, | ||
use: ['@svgr/webpack'] | ||
}) | ||
|
||
if (!isServer) { | ||
config.resolve.alias['@public'] = path.join(__dirname, 'public') | ||
// eslint-disable-next-line no-undef | ||
// config.resolve.alias['@public'] = path.join(__dirname, 'public') | ||
} | ||
|
||
return config | ||
}, | ||
nx: { | ||
// Set this to true if you would like to use SVGR | ||
// See: https://github.com/gregberge/svgr | ||
svgr: false | ||
} | ||
} | ||
|
||
module.exports = nextConfig | ||
const plugins = [ | ||
// Add more Next.js plugins to this list if needed. | ||
withNx | ||
] | ||
|
||
module.exports = composePlugins(...plugins)(nextConfig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"installCommand": "pnpm install", | ||
"buildCommand": "pnpm run build:web", | ||
"framework": "nextjs" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters