Skip to content

[CD] interface

[CD] interface #5

Workflow file for this run

name: CD
on:
pull_request:
types: [closed]
branches:
- wrap-0.1
jobs:
interface:
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
working-directory: ./interface
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Install dependencies
run: yarn install --nonInteractive --frozen-lockfile --prefer-offline
- name: Build
run: yarn build
- name: Deploy
run: yarn deploy
- name: PR New URI
uses: peter-evans/create-pull-request@v3
with:
branch: interface-cd-pr-${{github.event.number}}
commit-message: "[CD] interface"
title: "[CD] interface"
body: "Triggered by: https://github.com/${{github.repository}}/pull/${{github.event.number}}"
getImplementations:
runs-on: ubuntu-latest
outputs:
matrix: ${{ env.matrix }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- id: set-matrix
run: echo "matrix=$(./scripts/getImplementations.sh)" >> $GITHUB_ENV
implementations-cd:
runs-on: ubuntu-latest
needs:
- interface
- getImplementations
strategy:
matrix: ${{fromJSON(needs.getImplementations.outputs.matrix)}}
defaults:
run:
working-directory: ./implementations/${{ matrix.package }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '${{ steps.nvm.outputs.NVMRC }}'
- name: Build
run: yarn build
- name: Deploy
run: yarn deploy
- name: PR New URI
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ matrix.package }}-cd-pr-${{github.event.number}}
commit-message: "[CD] ${{ matrix.package }}"
title: "[CD] ${{ matrix.package }}"
body: "Triggered by: https://github.com/${{github.repository}}/pull/${{github.event.number}}"