From c40dba3e739844701dd35da8fd8a2f5a2d0cb28b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:25:22 +0000 Subject: [PATCH 1/7] Update azure-staticwebapp.yml --- .github/workflows/azure-staticwebapp.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/azure-staticwebapp.yml b/.github/workflows/azure-staticwebapp.yml index c340ab3..614f006 100644 --- a/.github/workflows/azure-staticwebapp.yml +++ b/.github/workflows/azure-staticwebapp.yml @@ -14,10 +14,10 @@ name: Deploy EOEFANS WEB to Azure Static Web Apps on: push: - branches: [ "main" ] - pull_request: - types: [synchronize, closed] - branches: [ "main" ] + branches: [ "release" ] +# pull_request: +# types: [synchronize, closed] +# branches: [ "release" ] # Environment variables available to all jobs and steps in this workflow env: From 93ac4d630f990c575c03d4b576e0218dc9b3db8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:34:53 +0000 Subject: [PATCH 2/7] Create github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 82 ++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 .github/workflows/github-page-deploy.yml diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml new file mode 100644 index 0000000..8b33621 --- /dev/null +++ b/.github/workflows/github-page-deploy.yml @@ -0,0 +1,82 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy dev-branch content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN 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: + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url } + + strategy: + matrix: + node-version: [16.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + runs-on: [ self-hosted ] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + name: Use Node.js ${{ matrix.node-version }} + with: + node-version: ${{ matrix.node-version }} + + - uses: pnpm/action-setup@v2 + name: Install pnpm + id: pnpm-install + with: + version: 7 + run_install: false + + - name: Get pnpm store directory + id: pnpm-cache + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Use pnpm to build + run: pnpm run build + +# - name: post-build test +# run: pnpm test + + - name: Setup Pages + uses: actions/configure-pages@v2 + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v1 From 3a83739ccd1e78dbfe122665b25295726b9182cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:35:36 +0000 Subject: [PATCH 3/7] Update github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml index 8b33621..69bec06 100644 --- a/.github/workflows/github-page-deploy.yml +++ b/.github/workflows/github-page-deploy.yml @@ -24,7 +24,7 @@ jobs: deploy: environment: name: github-pages - url: ${{ steps.deployment.outputs.page_url } + url: ${{ steps.deployment.outputs.page_url }} strategy: matrix: From 33f481a1161add1751699a57215ada82ecb3a96c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:39:00 +0000 Subject: [PATCH 4/7] Update github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml index 69bec06..a4b4077 100644 --- a/.github/workflows/github-page-deploy.yml +++ b/.github/workflows/github-page-deploy.yml @@ -11,7 +11,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: read + contents: write pages: write id-token: write From 077dd70225395ec6518acafc6f5c82c2264aeaa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:41:18 +0000 Subject: [PATCH 5/7] Update github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml index a4b4077..69bec06 100644 --- a/.github/workflows/github-page-deploy.yml +++ b/.github/workflows/github-page-deploy.yml @@ -11,7 +11,7 @@ on: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: write + contents: read pages: write id-token: write From ac763dc92c9427a3145723460013f8bd773a8ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:51:56 +0000 Subject: [PATCH 6/7] Update github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml index 69bec06..492ea14 100644 --- a/.github/workflows/github-page-deploy.yml +++ b/.github/workflows/github-page-deploy.yml @@ -76,7 +76,9 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: './dist' + path: | + dist + dist/assets - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 From 02ce6d92395c4b93187199b48933f6903efe75eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Kazami=20=5B=E4=B9=94=E6=B2=BB=C2=B7=E9=A2=A8?= =?UTF-8?q?=E8=A6=8B=5D?= Date: Tue, 14 Feb 2023 10:55:03 +0000 Subject: [PATCH 7/7] Update github-page-deploy.yml --- .github/workflows/github-page-deploy.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/github-page-deploy.yml b/.github/workflows/github-page-deploy.yml index 492ea14..a855008 100644 --- a/.github/workflows/github-page-deploy.yml +++ b/.github/workflows/github-page-deploy.yml @@ -76,9 +76,7 @@ jobs: - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: - path: | - dist - dist/assets + path: dist - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1