Skip to content

Create cloud-compute action #1

Create cloud-compute action

Create cloud-compute action #1

name: Check Transpiled JavaScript
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
check-dist:
name: Check dist/
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- name: Cache node_modules
uses: actions/cache@v3
with:
path: node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
node-modules-${{ runner.os }}
- name: Install dependencies
run: yarn install --frozen-lockfile --non-interactive
- name: Build actions
id: build
run: yarn build
# This will fail the workflow if the PR wasn't created by Dependabot.
- name: Compare Directories
id: diff
run: |
if [ "$(git diff --ignore-space-at-eol --text out/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text out/
exit 1
fi