How do I auto deploy monorepo (conrains only 1 frontend project and some backend services)

Is there any way to use the github action to deploy a nextjs frontend which is inside a monorepo. The monorepo contains multiple nodejs backend service and one frontend service. I only want to deploy the frontend to cloudflare pages.
4 Replies
Ayush
Ayush10mo ago
?ping
Dyno
Dyno10mo ago
Pong! 307ms
Cyb3r-Jak3
Cyb3r-Jak310mo ago
GitHub
GitHub - cloudflare/pages-action
Contribute to cloudflare/pages-action development by creating an account on GitHub.
Adi
Adi10mo ago
Pages action will definitely work. Just wanted to add that you can also use wrangler-action - https://github.com/cloudflare/wrangler-action Here is an example for using it with github actions to deploy a pages project in turborepo
- name: Deploy my-project
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy public/ --project-name=my-project-name
workingDirectory: 'apps/project-webapp'
packageManager: 'pnpm'
wranglerVersion: '3.23.0'
- name: Deploy my-project
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy public/ --project-name=my-project-name
workingDirectory: 'apps/project-webapp'
packageManager: 'pnpm'
wranglerVersion: '3.23.0'
Want results from more Discord servers?
Add your server