Clean up workflows, add command to restart API after uploading new one.
This commit is contained in:
parent
cf0ced975a
commit
85d760c09d
|
@ -22,5 +22,8 @@ jobs:
|
||||||
known_hosts: ${{ secrets.SSH_HOST }}
|
known_hosts: ${{ secrets.SSH_HOST }}
|
||||||
- name: Setup rsync
|
- name: Setup rsync
|
||||||
uses: GuillaumeFalourd/setup-rsync@v1.2
|
uses: GuillaumeFalourd/setup-rsync@v1.2
|
||||||
- run: rsync -avz -e ssh --delete finnow-api root@andrewlalis.com:/opt/finnow/finnow-api
|
- name: Upload API Executable
|
||||||
|
run: rsync -avz -e ssh --delete finnow-api root@andrewlalis.com:/opt/finnow/finnow-api
|
||||||
working-directory: ./finnow-api
|
working-directory: ./finnow-api
|
||||||
|
- name: Restart API
|
||||||
|
run: ssh -f root@andrewlalis.com 'systemctl restart finnow-api.service'
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
name: Build Web App
|
name: Build and Deploy Web App
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- 'web-app/**'
|
- 'web-app/**'
|
||||||
- '.gitea/workflows/build-web-app.yaml'
|
- '.gitea/workflows/web-app.yaml'
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -14,7 +14,8 @@ jobs:
|
||||||
node-version: '22.x'
|
node-version: '22.x'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
working-directory: ./web-app
|
working-directory: ./web-app
|
||||||
- run: npm run build
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
working-directory: ./web-app
|
working-directory: ./web-app
|
||||||
- name: Install SSH Key
|
- name: Install SSH Key
|
||||||
uses: shimataro/ssh-key-action@v2
|
uses: shimataro/ssh-key-action@v2
|
||||||
|
@ -23,5 +24,6 @@ jobs:
|
||||||
known_hosts: ${{ secrets.SSH_HOST }}
|
known_hosts: ${{ secrets.SSH_HOST }}
|
||||||
- name: Setup rsync
|
- name: Setup rsync
|
||||||
uses: GuillaumeFalourd/setup-rsync@v1.2
|
uses: GuillaumeFalourd/setup-rsync@v1.2
|
||||||
- run: rsync -rav -e ssh --delete dist/* root@andrewlalis.com:/opt/finnow/app-content
|
- name: Upload static web content
|
||||||
|
run: rsync -rav -e ssh --delete dist/* root@andrewlalis.com:/opt/finnow/app-content
|
||||||
working-directory: ./web-app
|
working-directory: ./web-app
|
Loading…
Reference in New Issue