Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deploy_staging.yml #8

Merged
merged 2 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 23 additions & 29 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,35 +41,29 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
eslint_flags: "client/"

prettier:
name: Prettier Check
runs-on: ubuntu-latest
if: github.event.review.state == 'approved'
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "14"
# prettier:
# name: Prettier Check
# runs-on: ubuntu-latest
# if: github.event.review.state == 'approved'
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v2
# with:
# ref: ${{ github.head_ref }}

- name: Install Dependencies
run: cp client/package.json ./ && yarn install
# - name: Setup Node.js
# uses: actions/setup-node@v1
# with:
# node-version: "14"

# - name: Prettify code
# uses: creyD/prettier_action@dev
# with:
# prettier_options: -c ./client/.prettierrc
# file_pattern: ./client/.
# dry: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Install Dependencies
# run: cp client/package.json ./ && yarn install

- name: Run linters
uses: wearerequired/lint-action@v1
with:
prettier: true
prettier_args: "-c ./client/.prettierrc ./client/."
# - name: Prettify code
# uses: creyD/prettier_action@dev
# with:
# prettier_options: -c ./client/.prettierrc
# file_pattern: ./client/.
# dry: true
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/deploy_staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Firebase Staging Deploy

on:
push:
branches: [development]
paths:
- "client/**"

jobs:
firebase-stage-deploy:
name: Firebase Development Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@master

- name: Setup Node v14
uses: actions/setup-node@master
with:
node-version: "14.x"

- name: Install Dependencies
run: cd client && yarn install --frozen-lockfile

- name: Build React WebApp
run: cd client && yarn build:prod

- name: Deploy to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT }}"
projectId: project-vormir
channelId: staging
expires: 30d