Skip to content

Commit

Permalink
No need to publish if not on main. Just validate. (#8)
Browse files Browse the repository at this point in the history
Split the tasks, and also update [setup-node](https://github.com/actions/setup-node).
  • Loading branch information
wolfman2000 authored Mar 25, 2024
1 parent ebb9166 commit f108a38
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/npm-renderer-out.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,21 @@ permissions:
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- name: Check out Repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -33,7 +31,7 @@ jobs:
- name: Upload the website
uses: actions/upload-artifact@v4
with:
name: test-artifact
name: offline-website
path: out/renderer/
if-no-files-found: error
overwrite: true
27 changes: 27 additions & 0 deletions .github/workflows/npm-validate-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Validate Web Build
run-name: Ensure the website can be built.
on:
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- name: Check out Repository
uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Installing the project dependencies
run: npm ci
- name: Building the project
run: npm run build

0 comments on commit f108a38

Please sign in to comment.