Bug fix in CI/CD workflow #2
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: FER App Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure NodeJS | |
uses: actions/setup-node@v3 | |
with: | |
- node-version: '21.x' | |
- name: Check Front-end build | |
- run: | | |
cd svelte_client | |
npm install | |
npm run build | |
- name: Deploy using SSH | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
PORT: ${{ secrets.PORT }} | |
key: ${{ secrets.SSHKEY }} | |
script: | | |
cd Facial-Emotion-Recognition | |
git pull origin main | |
# Build front-end | |
cd svelte_client | |
npm install | |
npm run build | |
# restart web server | |
sudo /bin/systemctl restart fer_app.service fer_app.socket nginx |