From 33e7965c19886c1b366897a354acecdbba4ba2f3 Mon Sep 17 00:00:00 2001 From: Chris Reddington <791642+chrisreddington@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:22:49 +0000 Subject: [PATCH 1/3] Add page deployment on main --- .github/workflows/deploy-pages.yml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy-pages.yml diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 000000000..e402c6345 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,44 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: "Install dependencies" + run: npm install + - name: "Build site" + run: npm run build + - name: "Deploy to GitHub Pages" + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: dist + + # Deploy job + deploy: + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action \ No newline at end of file From dde01c2ded16d021f5c74ec0d0062bff97b40dba Mon Sep 17 00:00:00 2001 From: Chris Reddington <791642+chrisreddington@users.noreply.github.com> Date: Wed, 10 Apr 2024 19:32:56 +0000 Subject: [PATCH 2/3] Minor tweak to fix path issue --- vite.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/vite.config.js b/vite.config.js index 248c2f847..99499e7e2 100644 --- a/vite.config.js +++ b/vite.config.js @@ -3,6 +3,7 @@ import react from "@vitejs/plugin-react"; // https://vitejs.dev/config/ export default defineConfig({ + base: '', plugins: [react()], test: { globals: true, From 37aaacd85a7d90343b1c692288b6a241a6cb50d2 Mon Sep 17 00:00:00 2001 From: Chris Reddington <791642+chrisreddington@users.noreply.github.com> Date: Fri, 12 Apr 2024 05:26:04 +0100 Subject: [PATCH 3/3] Update Action Version --- .github/workflows/deploy-pages.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index e402c6345..f02aef3ea 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: "Install dependencies" run: npm install - name: "Build site" @@ -41,4 +41,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action \ No newline at end of file + uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action