Skip to content

Commit

Permalink
Write ci/cd for deploy
Browse files Browse the repository at this point in the history
cp-dharti-r committed Sep 9, 2024
1 parent 78ee3a8 commit 80e4b3b
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/deploy-frontend-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: DeployFrontendCloudflarePagesDev

jobs:
deploy-frontend-dev:
runs-on: ubuntu-latest

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

- uses: actions/setup-node@v1
with:
node-version: "20"

- name: Install dependencies and Build the project
run: |
yarn install
yarn build
- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
run: |
npx wrangler pages deploy dist/ --project-name=canopas-website-dev --branch=main
2 changes: 1 addition & 1 deletion nuxt-frontend/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -73,6 +73,6 @@ export default defineNuxtConfig({
},
nitro: {
compressPublicAssets: true,
preset: "aws-lambda",
preset: !config.IS_PROD ? "cloudflare-pages" : "aws-lambda",
},
});

0 comments on commit 80e4b3b

Please sign in to comment.