-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from hotungkhanh/main
feat: add main.yml for CI/CD pipeline
- Loading branch information
Showing
2 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |