mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
chore: update GitHub Actions workflows for improved artifact handling and debugging
- Added an ID to the artifact upload step for better tracking. - Enhanced the verification step to include workflow and repository information. - Updated permissions to allow writing actions in the deploy workflow. - Added debug information to the deploy workflow for better visibility of event details.
This commit is contained in:
6
.github/workflows/build-preview.yml
vendored
6
.github/workflows/build-preview.yml
vendored
@@ -38,6 +38,7 @@ jobs:
|
|||||||
run: ls -la app/dist
|
run: ls -la app/dist
|
||||||
|
|
||||||
- name: Upload build artifact
|
- name: Upload build artifact
|
||||||
|
id: upload-artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: preview-build
|
name: preview-build
|
||||||
@@ -45,4 +46,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
- name: Verify artifact upload
|
- name: Verify artifact upload
|
||||||
run: echo "Artifact upload completed with ID ${{ steps.upload-artifact.step.outputs.artifact-id }}"
|
run: |
|
||||||
|
echo "Artifact upload completed"
|
||||||
|
echo "Workflow ID: ${{ github.run_id }}"
|
||||||
|
echo "Repository: ${{ github.repository }}"
|
||||||
26
.github/workflows/deploy-preview.yml
vendored
26
.github/workflows/deploy-preview.yml
vendored
@@ -5,11 +5,9 @@ on:
|
|||||||
workflows: ['Build Preview Deployment']
|
workflows: ['Build Preview Deployment']
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
branches-ignore:
|
|
||||||
- main
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: write
|
||||||
deployments: write
|
deployments: write
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
@@ -19,17 +17,29 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: |
|
||||||
github.event.workflow_run.conclusion == 'success' &&
|
github.event.workflow_run.conclusion == 'success' &&
|
||||||
github.event.workflow_run.event == 'pull_request'
|
github.event.workflow_run.head_repository.full_name == github.repository
|
||||||
name: Deploy Preview to Cloudflare Pages
|
name: Deploy Preview to Cloudflare Pages
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifact
|
- name: Debug Info
|
||||||
|
env:
|
||||||
|
EVENT_JSON: ${{ toJSON(github.event) }}
|
||||||
|
run: |
|
||||||
|
echo "Workflow Run ID: ${{ github.event.workflow_run.id }}"
|
||||||
|
echo "Event Type: ${{ github.event.workflow_run.event }}"
|
||||||
|
echo "Repository: ${{ github.event.workflow_run.head_repository.full_name }}"
|
||||||
|
echo "Full Event: $EVENT_JSON"
|
||||||
|
|
||||||
|
- name: Download artifacts
|
||||||
uses: dawidd6/action-download-artifact@v3
|
uses: dawidd6/action-download-artifact@v3
|
||||||
with:
|
with:
|
||||||
workflow: build-preview.yml
|
workflow: Build Preview Deployment
|
||||||
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
name: preview-build
|
name: preview-build
|
||||||
path: build
|
path: build
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
search_artifacts: true
|
||||||
if_no_artifact_found: error
|
|
||||||
|
- name: List files
|
||||||
|
run: ls -la build
|
||||||
|
|
||||||
- name: Deploy to Cloudflare Pages
|
- name: Deploy to Cloudflare Pages
|
||||||
uses: AdrianGonz97/refined-cf-pages-action@v1
|
uses: AdrianGonz97/refined-cf-pages-action@v1
|
||||||
|
|||||||
Reference in New Issue
Block a user