From 7ade08d9979b14b1b6db85bed9ae2edc9e01caed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AA=85=EC=A7=84?= <4mj.eo@dsm.hs.kr> Date: Wed, 23 Oct 2024 19:38:08 +0900 Subject: [PATCH] add deploy file --- .github/workflows/CD.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .xqaure/config.yaml | 5 +++++ 2 files changed, 48 insertions(+) create mode 100644 .github/workflows/CD.yml create mode 100644 .xqaure/config.yaml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..82d7a8b --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,43 @@ +name: CD + +on: + push: + branches: + - main + - develop + +jobs: + build: + runs-on: ubuntu-latest + + permissions: + id-token: write + contents: read + + strategy: + matrix: + node-version: [22.x] + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '22.x' + + - run: yarn + - run: yarn build + + - name: Deploy to xquare + uses: team-xquare/xquare-deployment-action@master + with: + environment: prod + access_key: ${{ secrets.XQUARE_ACCESS_KEY }} + buildargs: | + MYSQL_HOST=${{ secrets.MYSQL_HOST }} + MYSQL_USERNAME=${{ secrets.MYSQL_USERNAME }} + MYSQL_PASSWORD=${{ secrets.MYSQL_PASSWORD }} + REDIS_HOST=${{ secrets.REDIS_HOST }} + yarn_docker_build: true + yarn_workspace: '@service/eeats' diff --git a/.xqaure/config.yaml b/.xqaure/config.yaml new file mode 100644 index 0000000..e3c3329 --- /dev/null +++ b/.xqaure/config.yaml @@ -0,0 +1,5 @@ +config: + name: eeats + service_type: be + port: 8080 + prefix: / \ No newline at end of file