Skip to content

Commit

Permalink
pushing the new workflow files to be used in the new CLI method to ad…
Browse files Browse the repository at this point in the history
…d github actions
  • Loading branch information
luiguild committed Aug 1, 2024
1 parent dc9646d commit 774083c
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/delete.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Delete Branch in Based.io
on:
delete:
branches:
- "*"
jobs:
delete:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Install dependencies
run: npm install
- name: Build the action
run: npm run build
- name: Run the action
uses: atelier-saulx/based-deploy@main
with:
userID: ${{ secrets.BASED_USER_ID }}
apiKey: ${{ secrets.BASED_API_KEY }}
size: small
region: eu-central-1
action: delete-env
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy Branch in Based.io
on:
push:
branches:
- "*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18.15.0
- name: Install dependencies
run: npm install
- name: Build the action
run: npm run build
- name: Run the action
uses: atelier-saulx/based-deploy@main
with:
userID: ${{ secrets.BASED_USER_ID }}
apiKey: ${{ secrets.BASED_API_KEY }}
size: small
region: eu-central-1
action: create-env
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ tmp/**/*

# Various
.vscode
.idea

# Based CLI apiKey
apiKey.key
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"license": "MIT",
"main": "dist/server/index.js",
"scripts": {
"zip": "rm -f latest.zip && zip -r latest.zip ./ -x node_modules/\\* -x package-lock.json -x .DS_Store -x .git/\\*",
"zip": "rm -f latest.zip && zip -r latest.zip ./ -x .github/\\* -x node_modules/\\* -x package-lock.json -x .DS_Store -x .git/\\*",
"zip:cicd": "rm -f cicd-latest.zip && zip -r cicd-latest.zip ./.github",
"dev": "npx @based/cli dev",
"deploy": "npx @based/cli deploy"
},
Expand Down

0 comments on commit 774083c

Please sign in to comment.