Development (#98) #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: MS CLUB Production CI/CD | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: Production | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.4.0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2.5.0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: npm install -g yarn | |
- name: yarn install | |
run: yarn install | |
- name: yarn build | |
env: | |
REACT_APP_BACKEND_URL: ${{ secrets.REACT_APP_BACKEND_URL }} | |
REACT_APP_STORAGE_BUCKET_URL: ${{ secrets.REACT_APP_STORAGE_BUCKET_URL }} | |
REACT_APP_STORAGE_BUCKET_NAME: ${{ secrets.REACT_APP_STORAGE_BUCKET_NAME }} | |
run: yarn build | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v2.3.0 | |
with: | |
name: build | |
path: build | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2.4.0 | |
- name: Download a Build Artifact | |
uses: actions/download-artifact@v2.1.0 | |
with: | |
name: build | |
path: build | |
- name: GitHub Action for Firebase | |
uses: w9jds/firebase-action@v2.0.0 | |
with: | |
args: deploy --only hosting --project default | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |