From cebca552746b36631b4981e90aeb18b0fb824e96 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Fri, 27 Mar 2020 13:56:22 +0530 Subject: [PATCH] Create main.yml --- .github/workflows/main.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..c04276ba --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: Build and Deploy + +on: + push: + branches: [ master ] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout GitHub Repository + uses: actions/checkout@v2.0.0 + - name: Install Project Dependencies + run: npm install + - name: Build in Production + run: npm run build + - name: Archive Production Artifact + uses: actions/upload-artifact@v1.0.0 + with: + name: build + path: build + deploy: + name: Deploy + needs: build + runs-on: ubuntu-latest + steps: + - name: Checkout GitHub Repository + uses: actions/checkout@v2.0.0 + - name: Download Artifact + uses: actions/download-artifact@v1.0.0 + with: + name: build + - name: Deploy to Firebase Hosting + uses: w9jds/firebase-action@v1.3.0 + with: + args: deploy --only hosting + env: + FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}