name: Transpile

on:
  push:
    branches: [upstream-patched]

jobs:
  transpile:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
          ssh-key: ${{secrets.DEPLOY_KEY}}
      - uses: actions/setup-node@v1
        with:
          node-version: 10.x
      - uses: actions/cache@v2
        with:
          path: '**/node_modules'
          key: npm-v2-${{ hashFiles('**/package-lock.json') }}
          restore-keys: npm-v2-
      - run: npm ci
      - run: bash scripts/transpile-push.sh
