mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
chore: add production deployment workflow for Cloudflare Pages
- Introduced a new GitHub Actions workflow for deploying the application to Cloudflare Pages upon pushes to the main branch. - Configured steps for Node.js setup, dependency installation, and build processes using pnpm. - Included necessary permissions and secrets for secure deployment.
This commit is contained in:
parent
d198755d25
commit
c0449a62bb
47
.github/workflows/cloudflare-pages-production.yml
vendored
Normal file
47
.github/workflows/cloudflare-pages-production.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
name: Deploy to Cloudflare Pages (Production)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
name: Publish to Cloudflare Pages
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: app
|
||||
run: pnpm install
|
||||
|
||||
- name: Build
|
||||
working-directory: app
|
||||
run: pnpm build
|
||||
|
||||
- name: Publish to Cloudflare Pages
|
||||
uses: AdrianGonz97/refined-cf-pages-action@v1
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
|
||||
directory: app/dist
|
||||
deploymentName: Production
|
||||
branch: main
|
||||
wranglerVersion: '3'
|
Loading…
Reference in New Issue
Block a user