mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
chore: refactor build preview workflow for improved clarity and efficiency
- Renamed job from "build-and-deploy" to "build-preview" for better clarity. - Added concurrency settings to manage workflow runs effectively. - Streamlined steps by removing unnecessary commands and comments. - Updated pnpm action to the latest version and ensured proper Node.js versioning.
This commit is contained in:
parent
fe211b36fa
commit
899a91a254
37
.github/workflows/build-preview.yml
vendored
37
.github/workflows/build-preview.yml
vendored
@ -1,26 +1,23 @@
|
||||
name: Build Preview Deployment
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
build-preview:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and Deploy Preview
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v4
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 8
|
||||
node-version: 20
|
||||
cache: pnpm
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: app
|
||||
@ -29,10 +26,6 @@ jobs:
|
||||
- name: Build
|
||||
working-directory: app
|
||||
run: pnpm build
|
||||
|
||||
- name: List build output
|
||||
run: ls -la app/dist
|
||||
|
||||
# - name: Deploy to Cloudflare Pages
|
||||
# uses: AdrianGonz97/refined-cf-pages-action@v1
|
||||
# with:
|
||||
@ -44,17 +37,7 @@ jobs:
|
||||
# directory: app/dist
|
||||
|
||||
- name: Upload build artifact
|
||||
id: upload-artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: preview-build
|
||||
path: app/dist
|
||||
retention-days: 1
|
||||
|
||||
# - name: Verify artifact upload
|
||||
# run: |
|
||||
# echo "Artifact upload completed"
|
||||
# echo "Workflow ID: ${{ github.run_id }}"
|
||||
# echo "Repository: ${{ github.repository }}"
|
||||
# echo "Event name: ${{ github.event_name }}"
|
||||
# echo "Event type: ${{ github.event.action }}"
|
Loading…
Reference in New Issue
Block a user