From e324aa645885011414f13fd5f6db4b7c2b9131a6 Mon Sep 17 00:00:00 2001 From: waterricecake Date: Thu, 17 Oct 2024 17:43:49 +0900 Subject: [PATCH] =?UTF-8?q?chore=20:=20prod=20CI/CD=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/frontend-prod-CICD.yml | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/frontend-prod-CICD.yml diff --git a/.github/workflows/frontend-prod-CICD.yml b/.github/workflows/frontend-prod-CICD.yml new file mode 100644 index 0000000..295e02d --- /dev/null +++ b/.github/workflows/frontend-prod-CICD.yml @@ -0,0 +1,40 @@ +name: Prod CI/CD + +on: + push: + branches: [ prod ] + +permissions: + contents: read + +jobs: + build: + runs-on: + group: Default + labels: [ self-hosted, dev ] + permissions: + pull-requests: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install dependencies + run: npm install + + - name: Run build + run: npm run build + + - name: Copy to Prod Server + uses: appleboy/scp-action@master + with: + username: ${{ secrets.PROD_USER_NAME }} + host: ${{ secrets.PROD_SERVER }} + key: ${{ secrets.PROD_PEM_KEY }} + source: "./dist" + target: "~/" \ No newline at end of file