Skip to content

Commit

Permalink
Merge pull request #5 from lucasmsa/dev
Browse files Browse the repository at this point in the history
v1.0
  • Loading branch information
lucasmsa authored Jun 26, 2022
2 parents ea42505 + 0287a6c commit f3e5f86
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 35 deletions.
69 changes: 35 additions & 34 deletions .github/workflows/github-actions.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,7 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains multiple jobs
SonarCloud:
name: Sonarcloud
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 }}

Build_app:
Build_App:
# The type of runner that the job will run on
runs-on: ubuntu-latest
environment: Production
Expand Down Expand Up @@ -62,18 +41,40 @@ jobs:
- name: Build the app
run: |
yarn build
Vercel_deploy:
# This workflow contains multiple jobs
Sonar_Cloud:
name: Sonarcloud
needs: Build_App
runs-on: ubuntu-latest
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

- 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
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
sonar.organization=lucasmsa
sonar.projectKey=lucasmsa_hiit-maker
sonar.projectKey=lucasmsa_hiit-maker
sonar.coverage=**

1 comment on commit f3e5f86

@vercel
Copy link

@vercel vercel bot commented on f3e5f86 Jun 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

hiit-maker – ./

hiit-maker-git-prod-lucasmsa.vercel.app
hiit-maker-lucasmsa.vercel.app
hiit-maker.io

Please sign in to comment.