diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index a1b40d5c..1b056fe6 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -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 @@ -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 diff --git a/packages/internarbeidsflate-decorator-v3/preview.vite.config.ts b/packages/internarbeidsflate-decorator-v3/preview.vite.config.ts index 6199daf9..e1d3d2c4 100644 --- a/packages/internarbeidsflate-decorator-v3/preview.vite.config.ts +++ b/packages/internarbeidsflate-decorator-v3/preview.vite.config.ts @@ -3,6 +3,7 @@ import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], + base: '/internarbeidsflatedecorator/', build: { cssMinify: true, minify: true,