From 5288d8054d56b99b5bef4854ed4d3324ca47d1be Mon Sep 17 00:00:00 2001 From: Lyall Stewart Date: Wed, 25 Dec 2024 23:15:47 +0000 Subject: [PATCH 1/3] Create pages-deploy.yml --- .github/workflows/pages-deploy.yml | 49 ++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/pages-deploy.yml diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml new file mode 100644 index 0000000..1913845 --- /dev/null +++ b/.github/workflows/pages-deploy.yml @@ -0,0 +1,49 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy to GitHub Pages +on: + push: + branches: ['main'] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: 'pages' + cancel-in-progress: true + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: 22 + cache: 'npm' + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload dist folder + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From c2085c5f7fd47dbd0d80d8d583cbb22ffa87f24c Mon Sep 17 00:00:00 2001 From: Lyall Stewart Date: Wed, 25 Dec 2024 23:26:43 +0000 Subject: [PATCH 2/3] Fix error bring thrown by prettier. --- .github/workflows/pages-deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index 1913845..18c6a2e 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages on: push: - branches: ['main'] + branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -15,7 +15,7 @@ permissions: # Allow one concurrent deployment concurrency: - group: 'pages' + group: "pages" cancel-in-progress: true jobs: @@ -32,7 +32,7 @@ jobs: uses: actions/setup-node@v4 with: node-version: 22 - cache: 'npm' + cache: "npm" - name: Install dependencies run: npm ci - name: Build @@ -43,7 +43,7 @@ jobs: uses: actions/upload-pages-artifact@v3 with: # Upload dist folder - path: './dist' + path: "./dist" - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 From 8351f614872c879e682bb329e0d61eca8e24ff9b Mon Sep 17 00:00:00 2001 From: Lyall Stewart Date: Thu, 26 Dec 2024 17:26:25 +0000 Subject: [PATCH 3/3] Bump node version to v23 in action --- .github/workflows/pages-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pages-deploy.yml b/.github/workflows/pages-deploy.yml index 18c6a2e..dd1c9e2 100644 --- a/.github/workflows/pages-deploy.yml +++ b/.github/workflows/pages-deploy.yml @@ -31,7 +31,7 @@ jobs: - name: Set up Node uses: actions/setup-node@v4 with: - node-version: 22 + node-version: 23 cache: "npm" - name: Install dependencies run: npm ci