Skip to content

Bump semver from 5.7.1 to 5.7.2 in /frontend (#183) #209

Bump semver from 5.7.1 to 5.7.2 in /frontend (#183)

Bump semver from 5.7.1 to 5.7.2 in /frontend (#183) #209

name: Deploy frontend
on:
push:
branches:
- main
paths:
- 'frontend/**'
jobs:
deploy:
name: Deploy frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@master
- name: Install NPM packages
run: npm install
- name: Build NPM project
run: npm run build
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: Push dist
run: rsync -rtzv -e 'ssh -o "StrictHostKeyChecking no" -p ${{ secrets.REMOTE_PORT}}' dist/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/frontend
- name: Run deploy script
run: |
ssh -o "StrictHostKeyChecking no" -p ${{ secrets.REMOTE_PORT }} ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }} sudo /home/${{ secrets.REMOTE_USER }}/deploy-frontend.sh