mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
chore: update build preview workflow to include deployment step
- Renamed job to "Build and Deploy Preview" for clarity. - Added a deployment step to Cloudflare Pages with necessary configurations. - Updated permissions to include deployment rights.
This commit is contained in:
17
.github/workflows/build-preview.yml
vendored
17
.github/workflows/build-preview.yml
vendored
@@ -1,17 +1,18 @@
|
||||
name: "Build Preview Deployment"
|
||||
name: "Build and Deploy Preview"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
build-preview:
|
||||
build-and-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build Preview Site and Upload Build Artifact
|
||||
name: Build and Deploy Preview
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
pull-requests: write
|
||||
deployments: write
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -37,6 +38,16 @@ jobs:
|
||||
- name: List build output
|
||||
run: ls -la app/dist
|
||||
|
||||
- name: Deploy 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 }}
|
||||
deploymentName: Preview
|
||||
directory: app/dist
|
||||
|
||||
- name: Upload build artifact
|
||||
id: upload-artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
Reference in New Issue
Block a user