From 749318e0714f9ece59f04f1bf4b03ef6a300ad93 Mon Sep 17 00:00:00 2001 From: Azalea <22280294+hykilpikonna@users.noreply.github.com> Date: Mon, 16 Dec 2024 20:02:48 -0500 Subject: [PATCH] [F] Fix actions --- .github/workflows/vite.yml | 42 +++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/.github/workflows/vite.yml b/.github/workflows/vite.yml index 3f2b54d..9a9a05f 100644 --- a/.github/workflows/vite.yml +++ b/.github/workflows/vite.yml @@ -2,8 +2,20 @@ name: Vite Deploy on: push: - branches: - - main + branches: ["main"] + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false jobs: build: @@ -12,15 +24,21 @@ jobs: steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v2 - - run: | - bun install - bun run build - - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist + + - name: Build + run: bun install && bun run build - # - uses: actions/upload-artifact@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./dist + + # - name: Deploy + # uses: peaceiris/actions-gh-pages@v4 # with: - # name: pages - # path: ./dist + # github_token: ${{ secrets.GITHUB_TOKEN }} + # publish_dir: ./dist + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4