Skip to content

Use pkl-gha for GitHub Action Workflows #10

Use pkl-gha for GitHub Action Workflows

Use pkl-gha for GitHub Action Workflows #10

# Do not modify!
# This file was generated from a template using https://github.com/StefMa/pkl-gha
name: Check Transpiled JavaScript
'on':
pull_request: {}
push:
branches:
- main
permissions:
contents: read
jobs:
check-dist:
name: Check Dist
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install Dependencies
run: npm ci
- name: Build dist/ Directory
run: npm run bundle
- name: Compare Directories
id: diff
run: |-
if [ "$(git diff --ignore-space-at-eol --text dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff --ignore-space-at-eol --text dist/
exit 1
fi
- name: Upload Artifact
if: ${{ failure() && steps.diff.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: dist
path: dist