Skip to content

Commit 25f1ceb

Browse files
author
Martin Berg Alstad
authored
Build workflow (#138)
* Workflow for bygging. Endret navn på deploy job fra build til deploy Lagt inn formatering med prettier til yaml filer * Fjernet yaml fra formatering igjen, for å unngå å formatere lock-filen * Fikset lock filen og endret ts versjon til 5.2.2-ish pga. feil for ny versjon * Fjernet .x fra versjonsnummer * Oppdatert checkout og setup-node til v4 * Rerun pnpm install
1 parent b510fd6 commit 25f1ceb

4 files changed

Lines changed: 1941 additions & 1932 deletions

File tree

.github/dependabot.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "npm" # See documentation for possible values
9-
directory: "/" # Location of package manifests
10-
schedule:
11-
interval: "weekly"
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Installerer avhengigheter og bygger prosjektet
2+
# For mer informasjon: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
pull_request:
8+
branches: ["main"]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
# https://pnpm.io/continuous-integration#github-actions
17+
- uses: pnpm/action-setup@v3
18+
with:
19+
version: 8
20+
- name: Use Node.js 20
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
cache: "pnpm"
25+
- run: pnpm install
26+
- run: pnpm build
27+
# - run: pnpm test # Uncomment hvis det blir lagt til tester

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build": "next build",
99
"start": "next start",
1010
"lint": "next lint",
11-
"format": "prettier --check \"**/*.{js,jsx,ts,tsx,json,css,md}\"",
12-
"format:fix": "prettier --write \"**/*.{js,jsx,ts,tsx,json,css,md}\""
11+
"format": "prettier --check \"**/*.{js,jsx,ts,tsx,json,yml,css,md}\"",
12+
"format:fix": "prettier --write \"**/*.{js,jsx,ts,tsx,json,yml,css,md}\""
1313
},
1414
"dependencies": {
1515
"@heroicons/react": "^2.1.1",
@@ -44,6 +44,6 @@
4444
"prettier": "^3.0.3",
4545
"prettier-plugin-tailwindcss": "^0.5.7",
4646
"tailwindcss": "^3.4.1",
47-
"typescript": "^5.2.2"
47+
"typescript": "~5.2.2"
4848
}
4949
}

0 commit comments

Comments
 (0)