Skip to content

[CD] http-interface #11

[CD] http-interface

[CD] http-interface #11

name: http-interface-cd
on:
pull_request:
types: [closed]
branches:
- main
paths:
- "interface/**"
jobs:
cd:
name: http-interface-cd
if: |
github.event.pull_request.merged &&
endsWith(github.event.pull_request.title, '/workflows/publish')
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
working-directory: ./interface
- 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
working-directory: ./interface
- name: Build
run: yarn build
working-directory: ./interface
- name: Deploy
run: yarn deploy
working-directory: ./interface
env:
POLYWRAP_WRAPSCAN_AUTH_HEADER_PROD: ${{secrets.POLYWRAP_WRAPSCAN_AUTH_HEADER_PROD}}
- name: PR New URI
uses: peter-evans/create-pull-request@v3
with:
branch: interface-cd-pr-${{github.event.number}}
commit-message: "[CD] http-interface"
title: "[CD] http-interface"
body: "Triggered by: https://github.com/${{github.repository}}/pull/${{github.event.number}}"