Introduce a Node build system for minified CSS/JS with content hashes, add PWA support, i18n helpers, accessibility improvements, and more translatable strings. Move theme configuration from bookmarks to localStorage, add Playwright tests, and set up CI workflows.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: shaarli-pro
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: shaarli-pro/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build theme assets
|
||||
run: npm run build
|
||||
|
||||
- name: Verify JavaScript syntax
|
||||
run: |
|
||||
for f in js/*.js js/modules/*.js dist/*.js; do
|
||||
node --check "$f"
|
||||
done
|
||||
|
||||
- name: Ensure dist/ is up-to-date
|
||||
run: |
|
||||
git diff --exit-code dist/ || (
|
||||
echo "dist/ is out of date. Run 'npm run build' and commit the changes." && exit 1
|
||||
)
|
||||
Reference in New Issue
Block a user