-
Notifications
You must be signed in to change notification settings - Fork 265
53 lines (45 loc) · 1.41 KB
/
bulldozer-php-deployment.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Bulldozer PHP Deployment
on:
workflow_dispatch:
workflow_run:
workflows: ["Build and Upload"]
types:
- completed
jobs:
deploy_boilerplate_frontend:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: "bulldozer-php"
url: ${{ vars.URL }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifact
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
name: boilerplate-build
path: .
- name: Copy Artifacts to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "boilerplate.tar.gz"
target: "/var/www/boilerplate_fe/dev"
- name: Deploy on server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd /var/www/boilerplate_fe/dev
rm -rf .next
rm -rf public
tar -xzf boilerplate.tar.gz
rm -f boilerplate.tar.gz
pm2 restart boilerplate-frontend --update-env