From e94fcf1a85ad4767e766fdfc9a9cc8fb76ec884f Mon Sep 17 00:00:00 2001 From: tidvn Date: Thu, 31 Oct 2024 04:30:20 +0700 Subject: [PATCH] update --- .github/workflows/vercel.yml | 21 +++++++++++++++++++++ next.config.js | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/vercel.yml diff --git a/.github/workflows/vercel.yml b/.github/workflows/vercel.yml new file mode 100644 index 0000000..727b98b --- /dev/null +++ b/.github/workflows/vercel.yml @@ -0,0 +1,21 @@ +name: Vercel Production Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/next.config.js b/next.config.js index ec4d913..c1c1cfb 100644 --- a/next.config.js +++ b/next.config.js @@ -53,6 +53,7 @@ const securityHeaders = [ value: 'camera=(), microphone=(), geolocation=()', }, ] +const output = process.env.OUTPUT || undefined /** * @type {import('next/dist/next-server/server/config').NextConfig} @@ -60,7 +61,7 @@ const securityHeaders = [ module.exports = () => { const plugins = [withContentlayer, withBundleAnalyzer] return plugins.reduce((acc, next) => next(acc), { - output: 'standalone', + output: output, reactStrictMode: true, pageExtensions: ['ts', 'tsx', 'js', 'jsx', 'md', 'mdx'], eslint: {