We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2bc9cb + 0b5ab51 commit bba2f46Copy full SHA for bba2f46
1 file changed
.github/workflows/deploy.yml
@@ -0,0 +1,32 @@
1
+on:
2
+ release:
3
+ types: [created]
4
+
5
+name: Deploy to Production
6
7
+jobs:
8
+ deploy:
9
+ name: Deploy
10
+ runs-on: ubuntu-latest
11
12
+ steps:
13
+ - name: Checkout
14
+ uses: actions/checkout@v2
15
16
+ - name: Push to Docker Hub
17
+ uses: docker/build-push-action@v1
18
+ with:
19
+ username: ${{ secrets.DOCKER_USERNAME }}
20
+ password: ${{ secrets.DOCKER_PASSWORD }}
21
+ repository: poorvivaish/rce
22
+ tags: latest
23
24
+ - name: Setup key
25
+ id: setup-key
26
+ env:
27
+ EC2_KEY: ${{ secrets.EC2_KEY }}
28
+ run: |
29
+ echo "$EC2_KEY" >> $HOME/key.pem
30
+ chmod 400 $HOME/key.pem
31
+ - name: Update image on server
32
+ run: ssh -i $HOME/key.pem -o StrictHostKeyChecking=no ubuntu@52.206.192.83 './deploy.sh'
0 commit comments