Skip to content

Commit

Permalink
Add github Actions CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinav-ark committed Aug 11, 2024
1 parent 15cfa64 commit c793588
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI/CD

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:


jobs:
prepare:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Fetch Dockerfile
run: |
curl -O https://raw.githubusercontent.com/Abhinav-ark/placement_tracker_cicd/main/dockerfiles/placement_tracker_web/Dockerfile
- name: Cache Dockerfile
uses: actions/cache@v3
with:
path: ./Dockerfile
key: ${{ runner.os }}-dockerfile-${{ github.sha }}

main-workflow:
needs: prepare
uses: Abhinav-ark/placement_tracker_cicd/.github/workflows/placement_tracker_web_deploy.yml@main
with:
branch: ${{ github.ref }}
secrets:
BACKEND_URL: ${{ secrets.BACKEND_URL }}
WIF_PROVIDER: ${{ secrets.WIF_PROVIDER }}
WIF_SERVICE_ACCOUNT: ${{ secrets.WIF_SERVICE_ACCOUNT }}
2 changes: 1 addition & 1 deletion util/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const BASE_URL = `${process.env.NEXT_PUBLIC_URL}/api`;
const BASE_URL = `${process.env.NEXT_PUBLIC_URL?process.env.NEXT_PUBLIC_URL:"http://localhost:5000"}/api`;

export const LOGIN_URL = BASE_URL + "/login";
export const REGISTER_URL = BASE_URL + "/studentRegister";
Expand Down

0 comments on commit c793588

Please sign in to comment.