Skip to content

Commit

Permalink
Bytte til en bedre workflow for pages
Browse files Browse the repository at this point in the history
  • Loading branch information
LudvigHz committed Apr 16, 2024
1 parent dfbcac2 commit fc4453a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ concurrency:
group: gh-pages-dev
cancel-in-progress: true

permissions:
contents: read
pages: write
id-token: write

jobs:
gh-pages:
permissions:
contents: write
runs-on: ubuntu-latest
name: Deploy preview to gh-pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1

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

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
- uses: actions/configure-pages@v4
- uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/internarbeidsflate-decorator-v3/dist
path: ./packages/internarbeidsflate-decorator-v3/dist
- uses: actions/deploy-pages@v4
id: deployment
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react';

export default defineConfig({
plugins: [react()],
base: '/internarbeidsflatedecorator/',
build: {
cssMinify: true,
minify: true,
Expand Down

0 comments on commit fc4453a

Please sign in to comment.