mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: Add GitHub Actions workflow for PR preview deployments
This commit is contained in:
parent
09e6fd6aa3
commit
9111332760
29
.github/workflows/deploy.yml
vendored
Normal file
29
.github/workflows/deploy.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: PR Preview Static Files
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy-preview:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout PR branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy preview to gh-pages (pr-<NUM>)
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./ # 👈 O solo blueprints/ si prefieres
|
||||
destination_dir: pr-${{ github.event.pull_request.number }}
|
||||
|
||||
- name: Comment PR with Preview URL
|
||||
uses: marocchino/sticky-pull-request-comment@v2
|
||||
with:
|
||||
message: |
|
||||
🚀 PR Preview deployed!
|
||||
👉 [View it here](https://<USERNAME>.github.io/<REPO>/pr-${{ github.event.pull_request.number }}/)
|
Loading…
Reference in New Issue
Block a user