diff --git a/.github/workflows/github-actions.js.yml b/.github/workflows/github-actions.js.yml index 36872f0..429761b 100644 --- a/.github/workflows/github-actions.js.yml +++ b/.github/workflows/github-actions.js.yml @@ -14,7 +14,21 @@ 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 - build_test: + 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 }} + + Build_app: # The type of runner that the job will run on runs-on: ubuntu-latest environment: Production @@ -26,23 +40,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 - - - name: SonarCloud Scan - # You may pin to the exact commit or the version. - # uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049 - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.pullrequest.key=${{ github.event.number }} - -Dsonar.pullrequest.branch=${{ github.HEAD_REF }} - -Dsonar.pullrequest.base=${{ github.BASE_REF }} - -Dsonar.pullrequest.github.repository=${{ github.repository }} - -Dsonar.scm.provider=git - - - name: setup node + - name: Setup node uses: actions/setup-node@master with: node-version: ${{ matrix.node-version }} @@ -58,15 +56,18 @@ jobs: - name: Build the app run: | yarn build - - name: Vercel Action - # You may pin to the exact commit or the version. - # uses: amondnet/vercel-action@168e94457309ea2f8b885de5f181c8d79754b263 - uses: amondnet/vercel-action@v25 - 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 + + Vercel_deploy: + 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