Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4.1.5...v4.1.6) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
92 lines
2.4 KiB
YAML
92 lines
2.4 KiB
YAML
name: PR Workflows
|
|
|
|
# Run action on pull request event
|
|
on: [pull_request]
|
|
|
|
|
|
jobs:
|
|
# Build exampleSite
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# checkout to the commit that has been pushed
|
|
- uses: actions/checkout@v4.1.6
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install node modules
|
|
run: npm install
|
|
|
|
- name: Setup Hugo
|
|
uses: peaceiris/actions-hugo@v3.0.0
|
|
with:
|
|
hugo-version: 'latest'
|
|
extended: true
|
|
|
|
- name: Build
|
|
run: |
|
|
cd exampleSite
|
|
hugo --minify
|
|
|
|
# Run linter
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4.1.6
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Install node modules
|
|
run: npm install
|
|
|
|
- name: Lint
|
|
run: |
|
|
npm run lint
|
|
|
|
lighthouse-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Waiting for Netlify Preview
|
|
uses: kamranayub/wait-for-netlify-action@v2.1.1
|
|
id: preview
|
|
with:
|
|
site_name: "toha-ci"
|
|
max_timeout: 300
|
|
env:
|
|
NETLIFY_TOKEN: ${{secrets.NETLIFY_TOKEN}}
|
|
|
|
- name: Run Lighthouse
|
|
uses: foo-software/lighthouse-check-action@v12.0.1
|
|
id: lighthouseCheck
|
|
with:
|
|
accessToken: ${{ secrets.LIGHTHOUSE_TOKEN }}
|
|
gitHubAccessToken: ${{secrets.GITHUB_TOKEN}}
|
|
emulatedFormFactor: 'all'
|
|
prCommentEnabled: true
|
|
prCommentSaveOld: false
|
|
timeout: 5
|
|
urls: "${{ steps.preview.outputs.url }},${{ steps.preview.outputs.url }}/posts/,${{ steps.preview.outputs.url }}/posts/markdown-sample/,${{ steps.preview.outputs.url }}/posts/shortcodes/"
|
|
|
|
# Ensure that PR has desired labels
|
|
enforce-label:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: yogevbd/enforce-label-action@2.2.2
|
|
with:
|
|
REQUIRED_LABELS_ANY: "automerge,breaking-change,bug-fix,enhancement,feature,translation"
|
|
REQUIRED_LABELS_ANY_DESCRIPTION: "The PR must have at least one these labels: ['automerge','breaking-change','bug-fix','enhancement','feature','translation']"
|
|
|
|
# Check for any broken links
|
|
markdown-link-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# checkout to latest commit
|
|
- uses: actions/checkout@v4.1.6
|
|
# run markdown linter
|
|
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
|