Added finnow-api.service, api.yaml workflow.
Build and Deploy API / build-and-deploy (push) Failing after 3s
Details
Build and Deploy API / build-and-deploy (push) Failing after 3s
Details
This commit is contained in:
parent
9818bce1bf
commit
e5812c3202
|
@ -0,0 +1,26 @@
|
|||
name: Build and Deploy API
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'finnow-api/**'
|
||||
- '.gitea/workflows/api.yaml'
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-ons: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dlang-community/setup-dlang@v2
|
||||
with:
|
||||
compiler: ldc-latest
|
||||
- name: Build
|
||||
run: dub build --build=release
|
||||
working-directory: ./finnow-api
|
||||
- name: Install SSH Key
|
||||
uses: shimataro/ssh-key-action@v2
|
||||
with:
|
||||
key: ${{ secrets.DEPLOY_KEY }}
|
||||
known_hosts: ${{ secrets.SSH_HOST }}
|
||||
- name: Setup rsync
|
||||
uses: GuillameFalourd/setup-rsync@v1.2
|
||||
- run: rsync -avz -e ssh --delete finnow-api root@andrewlalis.com:/opt/finnow/finnow-api
|
||||
working-directory: ./finnow-api
|
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=finnow-api
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
WorkingDirectory=/opt/finnow
|
||||
ExecStart=/opt/finnow/finnow-api
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Loading…
Reference in New Issue