-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (28 loc) · 1.07 KB
/
firebase_web.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Firebase hosting
on:
push:
branches: [master, dev]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Install firebase tools
run: |
sudo npm install -g firebase-tools
firebase use rid1-test --token ${{secrets.FIREBASE_TOKEN}}
- name: Build website
run: |
yarn
yarn build
- name: Deploy to staging site
if: github.ref == 'refs/heads/dev'
run: firebase deploy --only hosting:dev --non-interactive --token ${{secrets.FIREBASE_TOKEN}} -m "RunID ${{ github.run_id }} Commit SHA ${{ github.sha }}"
- name: Deploy to production site
if: github.ref == 'refs/heads/master'
run: firebase deploy --only hosting:prod --non-interactive --token ${{secrets.FIREBASE_TOKEN}} -m "RunID ${{ github.run_id }} Commit SHA ${{ github.sha }}"
- name: Archive build Artifact
uses: actions/upload-artifact@master
with:
path: build