From 37d0d2393147f32c53161405da70e4e803731d4b Mon Sep 17 00:00:00 2001 From: MijinkoSD <79152329+MijinkoSD@users.noreply.github.com> Date: Mon, 6 May 2024 14:21:23 +0900 Subject: [PATCH] =?UTF-8?q?Add:=20GitHub=20Pages=E3=81=AB=E8=87=AA?= =?UTF-8?q?=E5=8B=95=E3=83=87=E3=83=97=E3=83=AD=E3=82=A4=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=83=AF=E3=83=BC=E3=82=AF=E3=83=95=E3=83=AD=E3=83=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-github-pages.yml | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/deploy-github-pages.yml diff --git a/.github/workflows/deploy-github-pages.yml b/.github/workflows/deploy-github-pages.yml new file mode 100644 index 0000000..46efcb9 --- /dev/null +++ b/.github/workflows/deploy-github-pages.yml @@ -0,0 +1,60 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +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: Use Node.js + uses: actions/setup-node@v4.0.2 + with: + node-version: "18.13" + - name: Setup Pnpm + uses: pnpm/action-setup@v3.0.0 + with: + version: 9.0.6 + + - name: Setup Pages + uses: actions/configure-pages@v5 + + - run: pnpm install + + - run: pnpm build-demo + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: "dist-demo" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4