From d1be334a80d6ed23a5b002dea9aeee26d27972b7 Mon Sep 17 00:00:00 2001 From: yudete Date: Sat, 5 Sep 2020 08:46:34 +0900 Subject: [PATCH] Update firebase.yml --- .github/workflows/firebase.yml | 47 +++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/.github/workflows/firebase.yml b/.github/workflows/firebase.yml index c274948..eb84f9e 100644 --- a/.github/workflows/firebase.yml +++ b/.github/workflows/firebase.yml @@ -1,21 +1,38 @@ -name: Deploy to Firebase Hosting - -on: [push] +name: Firebase Hosting +on: + push: + branches: + - master jobs: -Firebase: - name: Firebase + build: + name: Build runs-on: ubuntu-latest steps: - - name: Checkout Repo + - name: Checkout Repo uses: actions/checkout@master - - name: Setup Node - uses: actions/setup-node@v1 - with: - node-version: 10.x - registry-url: 'https://registry.npmjs.org' - - name: Install Dependencies + - name: Install Dependencies run: npm install - - name: Deploy to Firebase Hosting - run: | - npm run deploy --token=${{ secrets.FIREBASE_TOKEN }} \ No newline at end of file + - name: Archive Production Artifact + uses: actions/upload-artifact@master + with: + name: dist + path: dist + 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: dist + path: dist + - name: Deploy to Firebase + uses: w9jds/firebase-action@master + with: + args: deploy --only hosting:yudemoe + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} \ No newline at end of file