From cbd6604d794559767d7f34d5db7d3d6cc2ea3eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B8=B8=EA=B7=BC=EC=9A=B0?= <103028187+geunoo@users.noreply.github.com> Date: Fri, 29 Dec 2023 00:24:55 +0900 Subject: [PATCH] Create CD.yml --- .github/workflows/CD.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 0000000..79ff36b --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,38 @@ +name: afterschool-CD-with-xquare-deployment-action + +on: + push: + branches: [ main ] + +jobs: + build: + permissions: + id-token: write + contents: read + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: NodeJS Installation ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + - name: build + run: npm run build + working-directory: ./src + + - name: Cache node modules + uses: actions/cache@v2 + with: + path: node_modules + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-modules- + + - name: Deploy to xquare + uses: team-xquare/xquare-deployment-action@master + with: + environment: YOUR_ENVIRONMENT + access_key: ${{ secrets.ACCESS_KEY }} + github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}