We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3248789 commit d230c3cCopy full SHA for d230c3c
.github/workflows/deploy.yml
@@ -51,3 +51,19 @@ jobs:
51
target: '/home/ubuntu/'
52
strip_components: 1
53
54
+ - name: Extract and Deploy on EC2
55
+ uses: appleboy/ssh-action@master
56
+ with:
57
+ host: ${{ secrets.EC2_HOST }}
58
+ username: ${{ secrets.EC2_USERNAME }}
59
+ key: ${{ secrets.EC2_SSH_PRIVATE_KEY }}
60
+ script: |
61
+ cd /home/ubuntu/
62
+ tar -xzf build.tar.gz
63
+ sudo rm -rf /etc/nginx/html/*
64
+ sudo mv dist/* /etc/nginx/html/
65
+ cd /etc/nginx/html
66
+ pm2 restart to-hero
67
+ sudo docker exec nginx nginx -s reload
68
+ rm -f /home/ubuntu/build.tar.gz
69
+
0 commit comments