Skip to content

Commit 0e4db12

Browse files
committed
ci: update workflows
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 780d9ae commit 0e4db12

4 files changed

Lines changed: 70 additions & 7 deletions

File tree

.github/workflows/node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
run: npm run lint
5353

5454
- name: Build library
55-
run: npm run build:lib
55+
run: npm run build
5656

5757
- name: Check build changes
5858
run: |

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
CYPRESS_INSTALL_BINARY: 0
4848
run: |
4949
npm i
50-
npm run build:lib
50+
npm run build
5151
5252
- name: Publish to npm
5353
run: npm publish --provenance --access public

.github/workflows/pages.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
22
# SPDX-License-Identifier: AGPL-3.0-or-later
33

4-
name: Deploy A DEMO
4+
name: Deploy Demo
55

66
on:
77
workflow_dispatch:
@@ -16,17 +16,28 @@ jobs:
1616
- name: Checkout repository
1717
uses: actions/checkout@v4
1818

19-
- name: Set up Node.js
19+
- name: Read package.json node and npm engines version
20+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
21+
id: versions
22+
with:
23+
fallbackNode: '^20'
24+
fallbackNpm: '^10'
25+
26+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
2027
uses: actions/setup-node@v4
28+
with:
29+
node-version: ${{ steps.versions.outputs.nodeVersion }}
30+
31+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
32+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
2133

2234
- name: Install & Build
2335
run: |
2436
npm i
25-
npm install -g cross-env
26-
cross-env PUBLIC_PATH=/pdf-elements/ npm run build
37+
npm run build:demo
2738
2839
- name: Deploy
2940
uses: JamesIves/github-pages-deploy-action@v4
3041
with:
3142
branch: gh-pages
32-
folder: dist
43+
folder: dist-demo

.github/workflows/tests.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
2+
# SPDX-License-Identifier: AGPL-3.0-or-later
3+
4+
name: Tests
5+
6+
on:
7+
pull_request:
8+
push:
9+
branches:
10+
- main
11+
12+
permissions:
13+
contents: read
14+
15+
concurrency:
16+
group: tests-${{ github.head_ref || github.run_id }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
23+
name: NPM test
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
29+
30+
- name: Read package.json node and npm engines version
31+
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
32+
id: versions
33+
with:
34+
fallbackNode: '^20'
35+
fallbackNpm: '^10'
36+
37+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
38+
uses: actions/setup-node@v4
39+
with:
40+
node-version: ${{ steps.versions.outputs.nodeVersion }}
41+
42+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
43+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
44+
45+
- name: Install dependencies
46+
env:
47+
CYPRESS_INSTALL_BINARY: 0
48+
PUPPETEER_SKIP_DOWNLOAD: true
49+
run: npm i
50+
51+
- name: Test
52+
run: npm run test

0 commit comments

Comments
 (0)