Skip to content

Update cd.yml

Update cd.yml #13

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 Amazon S3 🚀
uses: reggionick/s3-deploy@v4
with:
folder: libs/json-difference/dist
bucket: ${{ secrets.AWS_S3_BUCKET }}
bucket-region: ${{ secrets.S3_BUCKET_REGION }}
delete-removed: true
no-cache: true
private: true
files-to-include: '{.*/**,**}'
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}