Pull Request guidelines #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate GitHub Pages Website | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "website/**" | |
# env: | |
# WORKING_DIR: ./website | |
# defaults: | |
# run: | |
# working-directory: ./website | |
jobs: | |
test-deploy: | |
# Don't run in Changeset PRs | |
if: ${{ github.actor != 'dx-pagopa-bot' }} | |
name: Test deployment | |
runs-on: ubuntu-latest | |
env: | |
TURBO_CACHE_DIR: .turbo-cache | |
steps: | |
- name: Check out code | |
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 | |
with: | |
fetch-depth: 0 | |
- name: Setup yarn | |
run: corepack enable | |
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b #v4.0.3 | |
with: | |
node-version-file: ".node-version" | |
cache: yarn | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Setup turbo cache | |
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 #v4.2.0 | |
with: | |
path: ${{ env.TURBO_CACHE_DIR }} | |
key: ${{ runner.os }}-turbo-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-turbo- | |
- name: Test build website | |
run: yarn run build |