Update main.yml #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- main | |
env: | |
CI: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 18 | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Generate PEM | |
run: echo "$PEM" >> tcp.pem && chmod 400 tcp.pem | |
env: | |
PEM: ${{secrets.PEM}} | |
- name: Doing the magic now | |
run: ssh -i tcp.pem [email protected] "cd /home && sudo mkdir hui && sudo systemctl restart nginx" | |
- name: LIVE!!! | |
run: echo "Site is Live!🚀🚀🚀" |