Skip to content

Commit a3327d9

Browse files
committed
Lägg till arbetsflöde för github pages
1 parent 17970a5 commit a3327d9

File tree

3 files changed

+45
-1
lines changed

3 files changed

+45
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and deploy to pages
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Use Node.js 22.x
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: 22.x
22+
cache: 'npm'
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Build
26+
run: npm run build
27+
- name: Upload
28+
uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: dist/
31+
32+
deploy:
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
runs-on: ubuntu-latest
37+
if: github.event_name == 'push' && needs.build.result == 'success'
38+
needs: build
39+
steps:
40+
- name: Deploy to GitHub Pages
41+
id: deployment
42+
uses: actions/deploy-pages@v4
43+
with:
44+
token: ${{ github.token }}

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<title>Skyltprogram</title>
55
<meta charset="UTF-8">
6-
<link rel="stylesheet" href="styles.css">
6+
<link rel="stylesheet" href="css/styles.css">
77
</head>
88
<body>
99
<div id="header"><select id="selectTemplate"><option value="-1" disabled selected>Ladda ett exempel...</option></select></div>
File renamed without changes.

0 commit comments

Comments
 (0)