From f329dcbf317f75a291e0bedcb4a9ab7f9721f88b Mon Sep 17 00:00:00 2001 From: Tyler Gottfredsen Date: Thu, 2 Jan 2025 15:25:49 -0600 Subject: [PATCH] Updating deploy to github pages --- .github/workflows/deploy-preview.yml | 12 ++++++++++++ .github/workflows/deploy.yml | 12 ++++++++++++ 2 files changed, 24 insertions(+) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index be760a2..4f2aa79 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -6,6 +6,10 @@ on: workflow_dispatch: jobs: build-and-deploy: + environment: preview + permissions: + id-token: write + pages: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -19,3 +23,11 @@ jobs: env: VITE_BRANCH: ${{ github.ref_name }} VITE_PREVIEW: 1 + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + # upload entire directory + path: "./dist" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 95d608f..9078d22 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -6,6 +6,10 @@ on: workflow_dispatch: jobs: build-and-deploy: + environment: production + permissions: + id-token: write + pages: write runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,3 +22,11 @@ jobs: - run: npm run build env: VITE_BRANCH: ${{ github.ref_name }} + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + # upload entire directory + path: "./dist" + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4