Skip to content

Commit fc4453a

Browse files
committed
Bytte til en bedre workflow for pages
1 parent dfbcac2 commit fc4453a

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

.github/workflows/gh-pages.yaml

+13-7
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@ concurrency:
88
group: gh-pages-dev
99
cancel-in-progress: true
1010

11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
1115

1216
jobs:
1317
gh-pages:
14-
permissions:
15-
contents: write
1618
runs-on: ubuntu-latest
1719
name: Deploy preview to gh-pages
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
1823
steps:
19-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2025
- uses: oven-sh/setup-bun@v1
2126

2227
- run: bun install
@@ -26,8 +31,9 @@ jobs:
2631
working-directory: './packages/internarbeidsflate-decorator-v3'
2732
run: bun run build:preview
2833

29-
- name: Deploy
30-
uses: peaceiris/actions-gh-pages@v4
34+
- uses: actions/configure-pages@v4
35+
- uses: actions/upload-pages-artifact@v3
3136
with:
32-
github_token: ${{ secrets.GITHUB_TOKEN }}
33-
publish_dir: ./packages/internarbeidsflate-decorator-v3/dist
37+
path: ./packages/internarbeidsflate-decorator-v3/dist
38+
- uses: actions/deploy-pages@v4
39+
id: deployment

packages/internarbeidsflate-decorator-v3/preview.vite.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react';
33

44
export default defineConfig({
55
plugins: [react()],
6+
base: '/internarbeidsflatedecorator/',
67
build: {
78
cssMinify: true,
89
minify: true,

0 commit comments

Comments
 (0)