From 107796a72cb416f4ccba5c20c9e64460a406fb22 Mon Sep 17 00:00:00 2001 From: Trevor Manz Date: Tue, 9 Aug 2022 16:25:36 -0400 Subject: [PATCH] feat: try github actions pages --- .github/workflows/gh-pages.yml | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 75a4e89..650bf9f 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -1,10 +1,17 @@ name: GitHub Pages 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 + jobs: - build-and-deploy: + build: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ @@ -26,10 +33,18 @@ jobs: - name: Build 🔧 run: pnpm build --base '/eigen-tour/' - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@3.7.1 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: dist - CLEAN: true + path: ./dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1