-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (39 loc) · 1.05 KB
/
deploy.yml
File metadata and controls
43 lines (39 loc) · 1.05 KB
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
name: Deploy to EC2
on:
workflow_call:
inputs:
branch:
description: 'Git branch to deploy'
required: false
type: string
default: 'main'
repo_base_dir:
description: 'Base directory on EC2 where cloud-services and web-client are located'
required: false
type: string
default: '/home/ubuntu'
secrets:
EC2_PEM_KEY:
description: 'EC2 PEM key for SSH authentication'
required: true
EC2_HOST:
description: 'EC2 host address'
required: true
EC2_USER:
description: 'EC2 SSH user'
required: true
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy to EC2
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Deploy to EC2
uses: ./.github/actions/deploy-to-ec2
with:
ec2_pem_key: ${{ secrets.EC2_PEM_KEY }}
ec2_host: ${{ secrets.EC2_HOST }}
ec2_user: ${{ secrets.EC2_USER }}
repo_base_dir: ${{ inputs.repo_base_dir }}
branch: ${{ inputs.branch }}