From abfdcd7649dc491d10abc67c984a31c2fbe56144 Mon Sep 17 00:00:00 2001 From: WizardRabbit Date: Mon, 14 Oct 2024 20:54:35 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20chore:=20=ED=94=84=EB=A1=9C?= =?UTF-8?q?=EC=A0=9D=ED=8A=B8=20=EC=9E=90=EB=8F=99=20=EB=B9=8C=EB=93=9C=20?= =?UTF-8?q?=EB=B0=8F=20=EB=B0=B0=ED=8F=AC=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=EC=9A=B0=EB=A5=BC=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Chrome, Firefox 버전에 대해 각각 진행 --- .github/workflows/project-deploy.yml | 56 ++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/project-deploy.yml diff --git a/.github/workflows/project-deploy.yml b/.github/workflows/project-deploy.yml new file mode 100644 index 00000000..6a444a6b --- /dev/null +++ b/.github/workflows/project-deploy.yml @@ -0,0 +1,56 @@ +name: Deploy Project + +on: + push: + branches: ['chore/automate-project-deploy', 'develop', 'main'] + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }} + cancel-in-progress: true + + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install Dependencies + run: | + npm ci + + - name: Get Version from package.json + id: get_version + run: | + VERSION=$(jq -r '.version' package.json) + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Build MV3 Project (for Chrome) + run: | + npm run build + + - name: Build MV2 Project (for Firefox) + run: | + npm run build:firefox + + - name: Deploy MV3 Project (for Chrome) + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./output/chrome-mv3 + destination_dir: v${{ env.VERSION }}-chrome-mv3 + publish_branch: deploy + + - name: Deploy MV2 Project (for Firefox) + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./output/firefox-mv2 + destination_dir: v${{ env.VERSION }}-firefox-mv2 + publish_branch: deploy + keep_files: true