Refactor workflows (#835)
Signed-off-by: hossainemruz <hossainemruz@gmail.com>
This commit is contained in:
parent
e5230e8c93
commit
93fc487111
14 changed files with 4384 additions and 440 deletions
68
.github/workflows/pull-request.yml
vendored
Normal file
68
.github/workflows/pull-request.yml
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
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.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install node modules
|
||||
run: npm install
|
||||
|
||||
- name: Setup Hugo
|
||||
uses: peaceiris/actions-hugo@v2.6.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.1
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install node modules
|
||||
run: npm install
|
||||
|
||||
- name: Lint
|
||||
run: |
|
||||
npm run lint
|
||||
|
||||
# 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.1
|
||||
# run markdown linter
|
||||
- uses: gaurav-nelson/github-action-markdown-link-check@1.0.15
|
Loading…
Add table
Add a link
Reference in a new issue