Refactor OrganizationForm component and related store #84
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 Fe | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Install dependencies | |
run: npm install | |
- name: Build Vue.js app | |
run: npm run build | |
- name: Setup SSH Agent | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.SERVER_SSH_KEY }} | |
- name: Stop the service | |
run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.USER_NAME }}@${{ secrets.HOST_NAME }} 'sudo systemctl stop keypracticafe' | |
- name: Update the repository on server | |
run: | | |
ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.USER_NAME }}@${{ secrets.HOST_NAME }} ' | |
if [ ! -d /home/keypractica/fe_server/.git ]; then | |
rm -rf /home/keypractica/fe_server && | |
git clone https://github.com/kneoio/kneox.git /home/keypractica/fe_server | |
else | |
cd /home/keypractica/fe_server && | |
git fetch origin && | |
git reset --hard origin/master && | |
git clean -fd | |
fi | |
' | |
- name: Run npm install on server | |
run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.USER_NAME }}@${{ secrets.HOST_NAME }} 'cd /home/keypractica/fe_server && npm install' | |
- name: Build application on server | |
run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.USER_NAME }}@${{ secrets.HOST_NAME }} 'cd /home/keypractica/fe_server && npm run build' | |
- name: Start the service | |
run: ssh -o StrictHostKeyChecking=no -p ${{ secrets.SSH_PORT }} ${{ secrets.USER_NAME }}@${{ secrets.HOST_NAME }} 'sudo systemctl start keypracticafe' |