Skip to content

Commit

Permalink
feat: add lint and Docker build CI (#16)
Browse files Browse the repository at this point in the history
* feat: add lint and Docker build CI
* fix: install weasyprint using apk
  • Loading branch information
greatislander authored Apr 8, 2024
1 parent cbd3e21 commit bdeae51
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
docker:
name: Docker build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build with Docker
run: docker build .
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint files

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
name: Lint files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies and lint files
run: |
npm ci
npm run lint
4 changes: 1 addition & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ WORKDIR /app

COPY package.json ./

RUN apk add --no-cache git python3 py3-pip pango gcc musl-dev py3-wheel python3-dev libffi-dev zlib-dev jpeg-dev

RUN pip install weasyprint
RUN apk add --no-cache git weasyprint

RUN npm install

Expand Down

0 comments on commit bdeae51

Please sign in to comment.