fix: solve blank screen bug when creating trainings #33
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 is a basic workflow to help you get started with Actions | |
name: CI-CD | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: ['dev'] | |
pull_request: | |
branches: ['dev'] | |
# # Allows you to run this workflow manually from the Actions tab | |
# workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
Build_App: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
environment: Production | |
strategy: | |
matrix: | |
node-version: [14.x] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@master | |
with: | |
node-version: ${{ matrix.node-version }} | |
# install applicaion dependencies | |
- name: Install dependencies | |
run: | | |
yarn | |
# build and test the apps | |
- name: Test the app | |
run: | | |
yarn test | |
- name: Build the app | |
run: | | |
yarn build | |
# This workflow contains multiple jobs | |
Sonar_Cloud: | |
name: Sonarcloud | |
needs: Build_App | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: SonarQube Quality Gate check | |
uses: sonarsource/sonarqube-quality-gate-action@master | |
# Force to fail step after specific time | |
timeout-minutes: 5 | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
Vercel_Deploy: | |
runs-on: ubuntu-latest | |
needs: Sonar_Cloud | |
environment: Production | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: amondnet/vercel-action@v20 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
vercel-args: '--prod' | |
vercel-org-id: ${{ secrets.VERCEL_ORGANIZATION_ID }} #Required | |
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} #Required | |
working-directory: ./ #Your Working Directory, Optional |