Skip to content

[C8 BE*] CI/CD Actions v13 #18

[C8 BE*] CI/CD Actions v13

[C8 BE*] CI/CD Actions v13 #18

Workflow file for this run

name: CICD Deployment API Koyeb
on:
push:
branches:
- Ch8BE
pull_request:
branches:
- Ch8BE
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: yarn install
# - name: Run tests
# run: npm test
# - name: Build project
# run: npm run build
deploy:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/Ch8BE'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: yarn install
# - name: Build project
# run: npm run build
- name: Deploy to Koyeb
env:
KOYEB_API_TOKEN: 7mn92452fwp2net3olqnxly8glbq0a6ejnwb603ntbb51w0smc7vzi92h0vkugzd
run: |
curl -X POST https://app.koyeb.com/v1/services/a35840b6-1e2a-4908-9031-47021e89551a/redeploy \
-H "Authorization: Bearer 7mn92452fwp2net3olqnxly8glbq0a6ejnwb603ntbb51w0smc7vzi92h0vkugzd" \
-H "Content-Type: application/json" \
-d '
{
"name": "Car-Management-Dashboard",
"git": {
"repo":"https://github.com/RazinSyakib43/Car-Management-Dashboard.git",
"branch":"Ch8BE"
}
}'