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:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize]
|
types: [opened, synchronize]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-preview:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build Preview Site and Upload Build Artifact
|
name: Build and Deploy Preview
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
actions: write
|
actions: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
deployments: write
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -37,6 +38,16 @@ jobs:
|
|||||||
- name: List build output
|
- name: List build output
|
||||||
run: ls -la app/dist
|
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
|
- name: Upload build artifact
|
||||||
id: upload-artifact
|
id: upload-artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user