Skip to content

Commit

Permalink
Merge pull request #113 from sharehouse-sanhaimu/feat/aiwaki/cicd
Browse files Browse the repository at this point in the history
[CICD] Build Test を行うWorkflowsを追加
  • Loading branch information
daikonoisii authored Mar 20, 2024
2 parents 2f598a4 + 914085f commit ab1b8f5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Test
run-name: build-test
on: [pull_request]

jobs:
test:
name: Build Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Create envfile for view
uses: SpicyPizza/[email protected]
with:
envkey_NEXT_PUBLIC_API_ACCESS_ID: ${{ secrets.NEXT_PUBLIC_API_ACCESS_ID }}
envkey_NEXT_PUBLIC_API_ACCESS_KEY: ${{ secrets.NEXT_PUBLIC_API_ACCESS_KEY }}
envkey_NEXT_PUBLIC_API_URL: ${{ secrets.NEXT_PUBLIC_API_URL }}
file_name: view.env

- name: Create envfile for api
uses: SpicyPizza/[email protected]
with:
envkey_OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
envkey_DEEPL_AUTH_KEY: ${{ secrets.DEEPL_AUTH_KEY }}
envkey_API_ACCESS_ID: ${{ secrets.API_ACCESS_ID }}
envkey_API_ACCESS_KEY: ${{ secrets.API_ACCESS_KEY }}
envkey_ACSESS_ALLOW_URL: ${{ secrets.ACSESS_ALLOW_URL }}
envkey_EXECUTING_ENVIRONMENT: ${{ secrets.EXECUTING_ENVIRONMENT }}
envkey_IMAGE_MODEL_CHATGPT: ${{ secrets.IMAGE_MODEL_CHATGPT }}
file_name: api.env

- name: Docker Compose Build
run: docker-compose -f docker-compose.prod.yml build
- name: Yarn Install
run: docker compose -f docker-compose.prod.yml run --rm view yarn
- name: Yarn Build
run: docker compose -f docker-compose.prod.yml run --rm view yarn build
- name: Docker Compose Up
run: docker-compose -f docker-compose.prod.yml up -d view api
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![Test](https://github.com/sharehouse-sanhaimu/ChatGP/actions/workflows/build_test.yml/badge.svg)

# ChatGP

【技育 CAMP2024】ハッカソン Vol.1 に参加して作成したアプリ
Expand Down

0 comments on commit ab1b8f5

Please sign in to comment.