Skip to content

Commit bdeae51

Browse files
feat: add lint and Docker build CI (#16)
* feat: add lint and Docker build CI * fix: install weasyprint using apk
1 parent cbd3e21 commit bdeae51

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

.github/workflows/docker-build.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Docker build
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
docker:
11+
name: Docker build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Build with Docker
16+
run: docker build .

.github/workflows/lint.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint files
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
lint:
11+
name: Lint files
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Cache node modules
16+
uses: actions/cache@v4
17+
with:
18+
path: node_modules
19+
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
20+
- name: Install dependencies and lint files
21+
run: |
22+
npm ci
23+
npm run lint

Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ WORKDIR /app
44

55
COPY package.json ./
66

7-
RUN apk add --no-cache git python3 py3-pip pango gcc musl-dev py3-wheel python3-dev libffi-dev zlib-dev jpeg-dev
8-
9-
RUN pip install weasyprint
7+
RUN apk add --no-cache git weasyprint
108

119
RUN npm install
1210

0 commit comments

Comments
 (0)