-
Notifications
You must be signed in to change notification settings - Fork 84
35 lines (31 loc) · 996 Bytes
/
pr-deploy.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
29
30
31
32
33
34
35
name: PR Deploy
on:
pull_request:
types: [opened, synchronize, reopened, closed]
jobs:
deploy-pr:
environment:
name: preview
url: ${{ steps.deploy.outputs.preview-url }}
runs-on: ubuntu-latest
steps:
- name: Checkout the branch
uses: actions/checkout@v4
- id: deploy
name: Pull Request Deploy
uses: hngprojects/pr-deploy@main-patch
with:
server_host: ${{ secrets.SERVER_HOST }}
server_username: ${{ secrets.SERVER_USERNAME }}
server_password: ${{ secrets.SERVER_PASSWORD }}
server_port: ${{ secrets.SERVER_PORT }}
comment: true
context: '.'
dockerfile: 'Dockerfile'
exposed_port: '8000'
#host_volume_path: '/var/'
#container_volume_path: '/var/'
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Print Preview URL
run: |
echo "Preview URL: ${{ steps.deploy.outputs.preview-url }}"