diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c2249e048..1469f8b65 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -5,8 +5,27 @@ on: workflow_dispatch: jobs: - build-and-test: + build: runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js 18 environment + uses: actions/setup-node@v3 + with: + node-version: 'lts/hydrogen' + + - name: Install root dependencies + uses: bahmutov/npm-install@v1 + + - name: Check if the page builds + run: npm run-script build + + test: + needs: build + runs-on: ubuntu-latest + steps: - name: Check out repository uses: actions/checkout@v3 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 7cdb8474c..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Build Page - -# Controls when the action will run. Triggers the workflow on pull request -# events but only for the master branch -on: pull_request - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # 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@v3 - - - name: Setup Node.js 18 environment - uses: actions/setup-node@v3 - with: - node-version: 'lts/hydrogen' - - - name: Install root dependencies - uses: bahmutov/npm-install@v1 - - - name: Check if the page builds - run: npm run-script build