From d582505e398380f752cc09c2dcab896fb2b99127 Mon Sep 17 00:00:00 2001 From: Noushad Date: Sun, 21 Jul 2024 01:41:16 +0200 Subject: [PATCH] ci: fix action pipeline --- .github/workflows/deploy-to-gh-pages.yml | 36 +++++++++++------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy-to-gh-pages.yml b/.github/workflows/deploy-to-gh-pages.yml index 3adcca2..1fcc280 100644 --- a/.github/workflows/deploy-to-gh-pages.yml +++ b/.github/workflows/deploy-to-gh-pages.yml @@ -1,37 +1,33 @@ name: Deploy React Application -# Controls when the action will run. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + + on: - # Triggers the workflow on push or pull request events but only for the main branch push: branches: [master] -# A workflow run is made up of one or more jobs that can run sequentially or in parallel +run-name: Build, Test, and Deploy + jobs: - build_test: - # The type of runner that the job will run on + build_test_deploy: runs-on: ubuntu-latest permissions: contents: write - concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - strategy: - matrix: - node-version: [21.x] # We will deploy with only one version of node - # 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@v4 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 + - uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} - - name: build and test - run: | - yarn install:fixed - yarn build - yarn test:no-watch + node-version: 21 + - name: Install dependencies + run: yarn install:fixed + - name: Build + run: yarn build + - name: Run tests + run: yarn test:no-watch - name: deploy to gh-pages uses: peaceiris/actions-gh-pages@v4 with: