Skip to content

Update cd.yml

Update cd.yml #11

Workflow file for this run

name: CD
on:
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node environment
uses: actions/setup-node@v3
with:
node-version: '18.17.0'
cache: 'yarn'
cache-dependency-path: |
.yarn
yarn.lock
- name: Install dependencies
run: yarn install --immutable
- name: Lint
run: yarn nx run-many --target=lint
- name: Type check
run: yarn nx run-many --target=type-check
- name: Test
run: yarn nx run-many --target=test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Build
run: yarn nx run-many --target=build --projects=playground,json-difference
- name: Deploy Playground to Github Pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: chore/gh-pages
target-folder: .
folder: apps/playground/dist
token: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Json Difference to Cloudflare Pages 🚀
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }}
directory: libs/json-difference/dist
wranglerVersion: '3'
branch: master