Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions .github/workflows/deploy-sandbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- simon/automa-cli-build-integration

jobs:
deploy:
Expand All @@ -25,19 +26,15 @@ jobs:
key: deploy-cache-${{ hashFiles('Backend/Package.resolved') }}
path: Backend/.build

- name: Get CLI Cache
uses: useblacksmith/cache@v5
id: cli-build
- name: Get AutomaCLI
uses: GetAutomaApp/private-actions/get-automacli@main
with:
key: deploy-cache-${{ hashFiles('CLI/Package.resolved') }}
path: CLI/.build
github_pat: ${{ secrets.GET_AUTOMACLI_GH_PAT }}

- uses: superfly/flyctl-actions/setup-flyctl@master
- run: |
npm run deploy:backend:sandbox
npm run deploy:worker:sandbox
ls -a Backend
ls -a CLI
env:
FLY_API_TOKEN: ${{ secrets.FLY_SANDBOX_API_KEY }}
FLY_METRICS_TOKEN: ${{ secrets.FLY_METRICS_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,5 @@ wireguard-prod.conf

.swiftlint.yml
.swiftformat

*.env.*
16 changes: 16 additions & 0 deletions automa.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"fly" : {
"environments" : [
"production",
"sandbox",
"staging"
],
"config_files_root" : "Backend/infra/fly"
},
"actionsSecrets" : {
"owner_repo" : "GetAutomaApp/AutomaInfraCore"
},
"grafana" : {
"current_environment" : "automa-grafana"
}
}
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"cli:docker": "docker exec -ti backend-app_dev-1 ./.build/aarch64-unknown-linux-gnu/debug/App --env local",
"prepare:action": "npm install",
"generate": "npm run cli -- generate",
"cli": "cd CLI && swift run AutomaCLI",
"fly:config": "npm run cli -- fly-config",
"cli": "automa",
"fly:config": "npm run generate -- fly",
"format": "swiftformat .",
"deploy:backend:sandbox": "npm run fly:config -- ../Backend/infra/fly/fly.toml sandbox | npm run deploy:to:fly",
"deploy:backend:staging": "npm run fly:config -- ../Backend/infra/fly/fly.toml staging | npm run deploy:to:fly",
"deploy:backend:production": "npm run fly:config -- ../Backend/infra/fly/fly.toml production | npm run deploy:to:fly",
"deploy:backend:sandbox": "npm run fly:config -- fly sandbox | npm run deploy:to:fly",
"deploy:backend:staging": "npm run fly:config -- fly staging | npm run deploy:to:fly",
"deploy:backend:production": "npm run fly:config -- fly production | npm run deploy:to:fly",
"deploy:to:fly": "tail -n 1 | xargs -Ixx cp xx Backend/.fly.toml && cd Backend && flyctl deploy --config=.fly.toml",
"deploy:worker:sandbox": "npm run fly:config -- ../Backend/infra/fly/fly-jobs.toml sandbox | npm run deploy:to:fly",
"deploy:worker:production": "npm run fly:config -- ../Backend/infra/fly/fly-jobs.toml production | npm run deploy:to:fly",
"deploy:worker:sandbox": "npm run fly:config -- fly-jobs sandbox | npm run deploy:to:fly",
"deploy:worker:production": "npm run fly:config -- fly-jobs production | npm run deploy:to:fly",
"build:all": "npx npm-run-all --parallel build:ui-kit build:backend",
"build:ui-kit": "cd App/AutomaUIKit && swift build",
"build:backend": "cd Backend && swift build",
Expand Down
Loading