Skip to content

Commit

Permalink
Merge pull request #15 from hotungkhanh/main
Browse files Browse the repository at this point in the history
feat: add main.yml for CI/CD pipeline
  • Loading branch information
hotungkhanh authored Sep 22, 2024
2 parents 2f8bb4c + d91517e commit 6cc4dd0
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI/CD Pipeline

on:
push:
branches:
- develop

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js for Frontend
uses: actions/setup-node@v2
with:
node-version: '20.17.0' # Specify your Node.js version

- name: Install Frontend Dependencies
run: |
cd frontend
npm install
- name: Build Frontend
run: |
cd frontend
npm run build # Adjust if necessary
# - name: Set up Java for Backend
# uses: actions/setup-java@v2
# with:
# java-version: '22.0.2' # Specify your Java version

# - name: Build Backend
# run: |
# cd backend
# mvn package # Use ./gradlew build for Gradle

deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_FRONTEND_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
appdir: "frontend"

# - uses: akhileshns/[email protected]
# with:
# heroku_api_key: ${{secrets.HEROKU_API_KEY}}
# heroku_app_name: ${{secrets.HEROKU_BACKEND_APP_NAME}}
# heroku_email: ${{secrets.HEROKU_EMAIL}}
# appdir: "backend"
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
.env/
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# env variables
.env

0 comments on commit 6cc4dd0

Please sign in to comment.