-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.19 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
name: Deploy
on:
push:
branches:
- main
- dev
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment'
required: true
default: 'Development'
type: choice
options:
- Development
- Production
jobs:
deploy-prod:
name: Production
if: github.ref == 'refs/heads/main' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Production')
uses: ./.github/workflows/deploy-script.yml
with:
environment: Production
branch: main
path: website-next
secrets:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
deploy-dev:
name: Development
if: github.ref == 'refs/heads/dev' || (github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'Development')
uses: ./.github/workflows/deploy-script.yml
with:
environment: Development
branch: dev
path: website-next
secrets:
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}