Skip to content

Commit

Permalink
ci: init
Browse files Browse the repository at this point in the history
  • Loading branch information
octoshikari committed Dec 28, 2023
1 parent bc864d6 commit 70111a9
Show file tree
Hide file tree
Showing 14 changed files with 681 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"
- "feat/ci-cd"
workflow_dispatch:

jobs:
publish-gpr:
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 }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
node_modules
.DS_Store
.env
.lsp
.clj-kondo
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 70111a9

Please sign in to comment.