Skip to content

Commit 8fc27e9

Browse files
authored
add: GitHub Actions workflow for Qualityfolio DB deployment
This workflow generates the Qualityfolio database and deploys it to the production server.
1 parent f1dfd33 commit 8fc27e9

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Generate Qualityfolio DB
2+
on:
3+
push:
4+
branches:
5+
- main
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: self-hosted
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
with:
16+
ref: main
17+
fetch-depth: 0
18+
19+
20+
- name: Execute Environment variables
21+
env:
22+
DATABASE_URL: "sqlite://resource-surveillance.sqlite.db?mode=rwc"
23+
WEB_ROOT: "./dev-src.auto"
24+
ALLOW_EXEC: "true"
25+
PORT: 9227
26+
run: |
27+
bash -x support/generate-qualityfolio-db.sh
28+
29+
- name: Archive build artifacts
30+
run: |
31+
cat support/assurance/qualityfolio/sqlpage/sqlpage.json
32+
#tar -czvf demo-netspective-hub-qualityfolio.tar.gz support/assurance/qualityfolio/resource-surveillance.sqlite.db support/assurance/qualityfolio/dev-src.auto support/assurance/qualityfolio/sqlpage
33+
tar -czvf demo-netspective-hub-qualityfolio.tar.gz support/assurance/qualityfolio/resource-surveillance.sqlite.db
34+
- name: Copy build artifacts to the production server
35+
run: |
36+
scp -P22 -o StrictHostKeyChecking=no demo-netspective-hub-qualityfolio.tar.gz "${{ secrets.PRODUCTION_DEPLOYMENT_USER }}@${{ secrets.PRODUCTION_DEPLOYMENT_SERVER_IP }}:"
37+
38+
- name: Deploy to production server
39+
run: |
40+
ssh -p22 -o StrictHostKeyChecking=no -t ${{ secrets.PRODUCTION_DEPLOYMENT_USER }}@${{ secrets.PRODUCTION_DEPLOYMENT_SERVER_IP }} "bash -i demo-netspective-hub-qualityfolio.sh"

0 commit comments

Comments
 (0)