ci: lint CI
Lint / Oxlint (push) Successful in 4m19s
Lint / ESLint (push) Successful in 4m23s
Deploy / Build (push) Successful in 4m26s
Deploy / Deploy to Stapler (push) Successful in 4m9s
Lint / Type Check (push) Failing after 3m11s

This commit is contained in:
2026-05-01 23:44:54 +02:00
parent 44a08ad715
commit 1b626c1e89
3 changed files with 83 additions and 11 deletions
+21 -10
View File
@@ -11,36 +11,47 @@ on:
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: https://github.com/oven-sh/setup-bun@v2
- name: Setup Bun
uses: https://github.com/oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/checkout@v6
- run: bun ci
- uses: actions/checkout@v6
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: bun ci
- name: Checkout articles repository
uses: actions/checkout@v6
with:
repository: ${{ vars.ARTICLES_REPOSITORY }}
ref: main
token: ${{ secrets.PRIVATE_CLONE_TOKEN }}
path: ./articles
- run: bun run build
- uses: actions/upload-artifact@v3
- name: Build project
run: bun run build
- name: Upload production files
uses: actions/upload-artifact@v3
with:
name: production-files
path: dist/
deploy:
stapler:
name: "Deploy to Stapler"
runs-on: ubuntu-latest
needs: build
if: ${{ vars.STAPLER_TARGET != '' }}
steps:
- uses: actions/download-artifact@v3
- name: Download production files
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist
- run: tar -czC dist -f dist.tar.gz .
- run: |
- name: Compress production files
run: tar -czC dist -f dist.tar.gz .
- name: Upload to Stapler server
run: |
curl -s -X PUT --data-binary "@dist.tar.gz" \
-H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \
${{ vars.STAPLER_CURL_ARGS }} \
+59
View File
@@ -0,0 +1,59 @@
name: Lint
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
on: [push, workflow_dispatch]
jobs:
lint-eslint:
name: 'ESLint'
runs-on: ubuntu-latest
steps:
- name: Setup Bun
uses: https://github.com/oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: bun ci
- name: Create fake articles
run: mv articles.example articles
- name: Run ESLint
run: bun run lint:eslint
lint-oxlint:
name: 'Oxlint'
runs-on: ubuntu-latest
steps:
- name: Setup Bun
uses: https://github.com/oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: bun ci
- name: Create fake articles
run: mv articles.example articles
- name: Run Oxlint
run: bun run lint:oxlint
type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- name: Setup Bun
uses: https://github.com/oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: bun ci
- name: Create fake articles
run: mv articles.example articles
- name: Run type check
run: bun run type-check
+3 -1
View File
@@ -1,3 +1,5 @@
[![](https://git.klemek.fr/klemek/md-blog/actions/workflows/lint.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/md-blog/actions?workflow=lint.yml) [![](https://git.klemek.fr/klemek/md-blog/actions/workflows/deploy.yml/badge.svg?branch=main&style=flat-square)](https://git.klemek.fr/klemek/md-blog/actions?workflow=deploy.yml)
# md-blog
## Minimal setup
@@ -25,4 +27,4 @@ bun run build
- [ ] archive page
- [x] about page
- [ ] link to previous/next article
- [ ] proper docs
- [ ] proper docs