From fc4b13f265877f84baf849b9beecfb4a01b20d1d Mon Sep 17 00:00:00 2001 From: developomp Date: Mon, 17 May 2021 23:27:33 +0900 Subject: [PATCH] separated build and deploy --- .github/workflows/firebase-hosting-merge.yml | 51 ++++++++++++++------ 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index e434955..996e388 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -4,23 +4,46 @@ on: branches: - dev jobs: - build_and_deploy: - name: Build and Deploy + build: + name: Build runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@master - - name: Install dependencies and build site + - name: Install Dependencies and Build run: cd source && yarn install && yarn build - - name: Apply target - uses: w9jds/firebase-action@master + - name: Archive Production Artifact + uses: actions/upload-artifact@master with: - args: target:apply hosting dev developomp-site - env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} - - name: Deploy to Firebase - uses: w9jds/firebase-action@master - with: - args: deploy --only hosting - env: - FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + name: build + path: build + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + - name: Download Artifact + uses: actions/download-artifact@master + with: + name: build + path: build + - name: Set target + uses: w9jds/firebase-action@master + with: + args: use developomp-site + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + - name: Apply target + uses: w9jds/firebase-action@master + with: + args: target:apply hosting dev developomp-site + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} + - name: Deploy to Firebase + uses: w9jds/firebase-action@master + with: + args: deploy --only hosting:dev + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}