-
Notifications
You must be signed in to change notification settings - Fork 548
28 lines (25 loc) · 1.04 KB
/
pr-preview.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: Preview PR
on:
pull_request_target:
jobs:
build:
runs-on: "ubuntu-22.04"
if: github.repository_owner == 'php'
steps:
- uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- uses: easingthemes/ssh-deploy@main
with:
REMOTE_HOST: ${{ secrets.PREVIEW_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.PREVIEW_REMOTE_USER }}
SSH_PRIVATE_KEY: ${{ secrets.PREVIEW_SSH_KEY }}
TARGET: "/home/thephpfoundation/preview/web-php-pr-${{ github.event.number }}/public"
SCRIPT_BEFORE: bash /home/thephpfoundation/scripts/pr_created_pre.sh web-php ${{ github.event.number }}
SCRIPT_AFTER: bash /home/thephpfoundation/scripts/pr_created.sh web-php ${{ github.event.number }}
- uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.number }}
edit-mode: 'replace'
body: |
🚀 Deployed on https://web-php-pr-${{ github.event.number }}.preview.thephp.foundation