Skip to content

update "content" submodule [skip linting] #3888

update "content" submodule [skip linting]

update "content" submodule [skip linting] #3888

Workflow file for this run

# See: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
name: Validate formatting, linting and types
env:
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
CLOUDINARY_CLOUD_NAME: ${{ secrets.CLOUDINARY_CLOUD_NAME }}
on: push
jobs:
lint:
# See; https://www.eliostruyf.com/devhack-skip-github-actions-specific-commits-messages/
if: ${{ !contains(github.event.head_commit.message, '[skip linting]') }}
runs-on: ubuntu-latest
name: Format, lint and check types
steps:
- uses: actions/checkout@v3
with:
# pull in src/content so content collections can be validated
submodules: recursive
# Allow access to private content repo
# GitHub personal access token created here: https://github.com/settings/tokens
token: ${{ secrets.ACTIONS_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
# use cached node_modules if found (instead of running npm install)
- run: npm ci --prefer-offline
# generate all imported json files so TypeScript imports will work
- name: Run prebuild scripts 👷‍♀️
run: npm run cloudinary:cache
- name: Validate formatting 💅
run: npm run format:check
- name: Validate linting 🧹
run: npm run lint:check
- name: Validate types 🔍
run: npm run types:check