Skip to content

Commit

Permalink
Add workflows for releases/* brands
Browse files Browse the repository at this point in the history
  • Loading branch information
duyet committed Sep 8, 2019
1 parent 8a82fbb commit f5c48a7
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_functions.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PriceTrack Deploy Functions
name: Deploy Functions

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy_hosting.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PriceTrack Deploy Functions
name: Deploy Hostings

on:
push:
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/deploy_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release - Deploy All

on:
push:
branches:
- 'releases/*'
jobs:

functons:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Run Eslint
run: |
cd functions
npm install
npm run lint
- name: Deploy functions
run: |
cd functions
npm install
export FIREBASE_TOKEN=${{ secrets.FIREBASE_TOKEN }}
npm run deploy
hosting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Run Eslint
run: |
cd hosting
npm install
npm run lint
- name: Deploy hosting
run: |
cd hosting
npm install
echo "GATSBY_API_KEY=${{ secrets.GATSBY_API_KEY }}\n" >> .env
echo "GATSBY_AUTH_DOMAIN=${{ secrets.FIREBASE_DOMAIN }}\n" > .env
echo "GATSBY_DATABASE_URL=${{ secrets.GATSBY_DATABASE_URL }}\n" > .env
echo "GATSBY_PROJECT_ID=${{ secrets.GATSBY_PROJECT_ID }}\n" > .env
echo "GATSBY_STORAGE_BUCKET=${{ secrets.GATSBY_STORAGE_BUCKET }}\n" > .env
echo "GATSBY_MESSAGING_SENDER_ID=${{ secrets.GATSBY_MESSAGING_SENDER_ID }}\n" > .env
echo "GATSBY_VAPID_KEY=${{ secrets.GATSBY_VAPID_KEY }}\n" > .env
echo "GATSBY_APPID=${{ secrets.GATSBY_APPID }}\n" > .env
npm run build
export FIREBASE_TOKEN=${{ secrets.FIREBASE_TOKEN }}
npm run deploy
database_storage_firestore:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 8.x
- name: Deploy Firebase Database, Storage, Firestore config
run: |
npm install -g firebase-tools
firebase deploy --only database,storage,firestore --token ${{ secrets.FIREBASE_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/on_pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PriceTrack Workflow on Pull Request
name: Pull Request

on: [pull_request]

Expand Down

0 comments on commit f5c48a7

Please sign in to comment.