|
| 1 | + |
| 2 | +### WARNING -- this file was generated by generate-workflows |
| 3 | +name: pr-preview |
| 4 | +on: pull_request_target |
| 5 | +jobs: |
| 6 | + build-upload: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + env: |
| 9 | + SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }} |
| 10 | + SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} |
| 11 | + GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }} |
| 12 | + GH_PR_NUM: ${{ github.event.number }} |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + # Yes, we really want to checkout the PR |
| 16 | + - run: | |
| 17 | + git fetch origin pull/$GH_PR_NUM/head:tmp |
| 18 | + git checkout tmp |
| 19 | +
|
| 20 | + - run: | |
| 21 | + git rev-parse origin/main |
| 22 | + git rev-parse HEAD |
| 23 | + git rev-parse origin/main..HEAD |
| 24 | + git log origin/main..HEAD --format="%b" |
| 25 | +
|
| 26 | + # Yes, we really want to checkout the PR |
| 27 | + # Injected by generate-workflows.js |
| 28 | + - uses: actions/setup-node@v4 |
| 29 | + with: |
| 30 | + node-version: '20' |
| 31 | + - uses: actions/cache@v4 |
| 32 | + id: npm-cache |
| 33 | + name: Load npm deps from cache |
| 34 | + with: |
| 35 | + path: '**/node_modules' |
| 36 | + key: ${{ runner.os }}-npm-14-${{ secrets.CACHE_VERSION }}-${{ hashFiles('package-lock.json') }} |
| 37 | + - run: npm install --frozen-lockfile --legacy-peer-deps |
| 38 | + if: steps.yarn-cache.outputs.cache-hit != 'true' |
| 39 | + - run: npm run build |
| 40 | + name: Build component groups |
| 41 | + - uses: actions/cache@v4 |
| 42 | + id: docs-cache |
| 43 | + name: Load webpack cache |
| 44 | + with: |
| 45 | + path: '.cache' |
| 46 | + key: ${{ runner.os }}-v4-${{ hashFiles('yarn.lock') }} |
| 47 | + - run: npm run build:docs |
| 48 | + name: Build docs |
| 49 | + - run: node .github/upload-preview.js packages/module/public |
| 50 | + name: Upload docs |
| 51 | + if: always() |
| 52 | + - run: npx puppeteer browsers install chrome |
| 53 | + name: Install Chrome for Puppeteer |
| 54 | + - run: npm run serve:docs & npm run test:a11y |
| 55 | + name: a11y tests |
| 56 | + - run: node .github/upload-preview.js packages/module/coverage |
| 57 | + name: Upload a11y report |
| 58 | + if: always() |
0 commit comments