Skip to content

Commit 9cd41c0

Browse files
Create install-nginx.yml
1 parent eeebbb2 commit 9cd41c0

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Install NGINX on Amazon Linux
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
install-nginx:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
14+
- name: Install NGINX on Amazon Linux via SSH
15+
uses: appleboy/ssh-action@v1.0.3
16+
with:
17+
host: ${{ secrets.EC2_HOST }}
18+
username: ec2-user
19+
key: ${{ secrets.EC2_SSH_KEY }}
20+
port: 22
21+
script: |
22+
sudo yum update -y
23+
sudo amazon-linux-extras enable nginx1
24+
sudo yum install -y nginx
25+
sudo systemctl start nginx
26+
sudo systemctl enable nginx

0 commit comments

Comments
 (0)