Skip to content

feat: add React rendering build-step #28

feat: add React rendering build-step

feat: add React rendering build-step #28

Workflow file for this run

name: Pull Request
on:
pull_request:
jobs:
Preview:
environment:
name: Preview
url: ${{ steps.deploy.outputs.deployment-url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .node-version
- uses: actions/cache@v4
id: cache-node_modules
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- if: steps.cache-node_modules.outputs.cache-hit != 'true'
run: npm ci
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- run: npm run build
- id: deployment
uses: cloudflare/wrangler-action@v3
with:
accountId: ${{ secrets.CF_ACCOUNT_ID }}
apiToken: ${{ secrets.CF_API_TOKEN }}
command: pages deploy --project-name=iiro