-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (73 loc) · 2.06 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Deployment Estatística
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - name: Build
# run: echo "Building the application"
# Deploy desenvolvimento
deploy-development:
runs-on: ubuntu-latest
environment:
name: development
url: ${{ vars.URL }}
# needs: build
steps:
- name: Repo Checkout
uses: actions/checkout@v2
- name: Hostinger Deployment
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rlgoDzvO --delete"
SOURCE: "./"
REMOTE_HOST: ${{ vars.REMOTE_HOST }}
REMOTE_USER: ${{ vars.REMOTE_USER }}
REMOTE_PORT: ${{ vars.REMOTE_PORT }}
TARGET: ${{ vars.TARGET }}
# Deploy staging
deploy-staging:
runs-on: ubuntu-latest
environment:
name: staging
url: ${{ vars.URL }}
needs: deploy-development
steps:
- name: Repo Checkout
uses: actions/checkout@v2
- name: Hostinger Deployment
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rlgoDzvO --delete"
SOURCE: "./"
REMOTE_HOST: ${{ vars.REMOTE_HOST }}
REMOTE_USER: ${{ vars.REMOTE_USER }}
REMOTE_PORT: ${{ vars.REMOTE_PORT }}
TARGET: ${{ vars.TARGET }}
# Deploy produção
deploy-production:
runs-on: ubuntu-latest
environment:
name: production
url: ${{ vars.URL }}
needs: deploy-staging
steps:
- name: Repo Checkout
uses: actions/checkout@v2
- name: Hostinger Deployment
uses: easingthemes/ssh-deploy@main
with:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rlgoDzvO --delete"
SOURCE: "./"
REMOTE_HOST: ${{ vars.REMOTE_HOST }}
REMOTE_USER: ${{ vars.REMOTE_USER }}
REMOTE_PORT: ${{ vars.REMOTE_PORT }}
TARGET: ${{ vars.TARGET }}