File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Remove preview PR
2+ on :
3+ pull_request :
4+ types : [ closed ]
5+
6+ jobs :
7+ build :
8+ runs-on : " ubuntu-22.04"
9+ if : github.repository_owner == 'php'
10+ steps :
11+ - uses : appleboy/ssh-action@v1.0.0
12+ with :
13+ host : ${{ secrets.PREVIEW_REMOTE_HOST }}
14+ username : ${{ secrets.PREVIEW_REMOTE_USER }}
15+ key : ${{ secrets.PREVIEW_SSH_KEY }}
16+ script : bash /home/thephpfoundation/scripts/pr_closed.sh web-php ${{ github.event.number }}
Original file line number Diff line number Diff line change 1+ name : Preview PR
2+ on :
3+ pull_request_target :
4+
5+ jobs :
6+ build :
7+ runs-on : " ubuntu-22.04"
8+ if : github.repository_owner == 'php'
9+ steps :
10+ - uses : actions/checkout@v4
11+ with :
12+ ref : " refs/pull/${{ github.event.number }}/merge"
13+
14+ - uses : easingthemes/ssh-deploy@main
15+ with :
16+ REMOTE_HOST : ${{ secrets.PREVIEW_REMOTE_HOST }}
17+ REMOTE_USER : ${{ secrets.PREVIEW_REMOTE_USER }}
18+ SSH_PRIVATE_KEY : ${{ secrets.PREVIEW_SSH_KEY }}
19+ TARGET : " /home/thephpfoundation/preview/web-php-pr-${{ github.event.number }}/public"
20+ SCRIPT_BEFORE : bash /home/thephpfoundation/scripts/pr_created_pre.sh web-php ${{ github.event.number }}
21+ SCRIPT_AFTER : bash /home/thephpfoundation/scripts/pr_created.sh web-php ${{ github.event.number }}
22+
23+ - uses : peter-evans/create-or-update-comment@v3
24+ with :
25+ issue-number : ${{ github.event.number }}
26+ edit-mode : ' replace'
27+ body : |
28+ 🚀 Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation
You can’t perform that action at this time.
0 commit comments