From f42e7949f5e4aab51da2f17d694cd86778ebfcec Mon Sep 17 00:00:00 2001 From: Mikel Elizondo Date: Thu, 22 Feb 2024 17:58:45 +0100 Subject: [PATCH] Add new github action for pull-requests --- .github/workflows/deploy.yml | 3 ++- .github/workflows/test_deploy.yml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test_deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f8805c8..73805cb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,9 +15,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: 20 + cache: npm - name: Install dependencies - run: npm install + run: npm ci - name: Build site run: npm run build diff --git a/.github/workflows/test_deploy.yml b/.github/workflows/test_deploy.yml new file mode 100644 index 0000000..3f0833d --- /dev/null +++ b/.github/workflows/test_deploy.yml @@ -0,0 +1,25 @@ +name: Test deployment + +on: + pull_request: + branches: + - main + +jobs: + test-deploy: + name: Test deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Test build website + run: npm run build \ No newline at end of file