Skip to content

Commit

Permalink
Merge pull request #1 from Aidbox/feat/ci-cd
Browse files Browse the repository at this point in the history
Feat/ci cd
  • Loading branch information
octoshikari authored Dec 28, 2023
2 parents 6728000 + 28be880 commit befcfbd
Show file tree
Hide file tree
Showing 13 changed files with 679 additions and 217 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
AIDBOX_USER=root
AIDBOX_PASSWORD=secret
AIDBOX_URL=https://localhost:8080
36 changes: 36 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & Deploy

on:
push:
branches:
- "main"
workflow_dispatch:

jobs:
test-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20
- run: npm ci
- run: |
node sync.mjs
env:
AIDBOX_URL: ${{ vars.AIDBOX_STAGE_URL }}
AIDBOX_USER: ${{ vars.AIDBOX_STAGE_USERNAME }}
AIDBOX_PASSWORD: ${{ vars.AIDBOX_STAGE_PASSWORD }}
- run: npm run test
env:
AIDBOX_URL: ${{ vars.AIDBOX_STAGE_URL }}
AIDBOX_USER: ${{ vars.AIDBOX_STAGE_USERNAME }}
AIDBOX_PASSWORD: ${{ vars.AIDBOX_STAGE_PASSWORD }}
- run: node sync.mjs
env:
AIDBOX_URL: ${{ vars.AIDBOX_PROD_URL }}
AIDBOX_USER: ${{ vars.AIDBOX_PROD_USERNAME }}
AIDBOX_PASSWORD: ${{ vars.AIDBOX_PROD_PASSWORD }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
node_modules
.DS_Store
.env
.lsp
.clj-kondo
pgdata
zen-packages
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.10.0
16 changes: 12 additions & 4 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"events": {
"start": "clear"
}
}
"watch": [
"routes",
"sync.mjs",
"aidbox-resources.yaml"
],
"legacyWatch": "true",
"ext": "yaml,clj,html,css,js",
"exec": "node sync.mjs",
"events": {
"start": "clear"
}
}
Loading

0 comments on commit befcfbd

Please sign in to comment.