Create main.yml

This commit is contained in:
Amruth Pillai 2020-03-27 13:56:22 +05:30 committed by GitHub
parent e3b6cea833
commit cebca55274
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 0 deletions

39
.github/workflows/main.yml vendored Normal file
View File

@ -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 }}