From 2e8a7c2b7a9d2778bff3bfc81d540867a14407df Mon Sep 17 00:00:00 2001 From: 273* Date: Mon, 27 Jul 2026 22:28:55 +0900 Subject: [PATCH] chore: add cd for deploying slide --- .github/workflows/deploy.yml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..ab37e1a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,56 @@ +name: Deploy pages + +on: + workflow_dispatch: + push: + branches: [main, master] + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-node@v6 + with: + node-version: "lts/*" + + - name: Setup @antfu/ni + run: npm i -g @antfu/ni + + - name: Install dependencies + run: nci + + - name: Build + run: nr build --base /${{github.event.repository.name}}/ + + - name: Setup Pages + uses: actions/configure-pages@v6 + with: + enablement: true + + - uses: actions/upload-pages-artifact@v5 + with: + path: dist + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: build + runs-on: ubuntu-latest + name: Deploy + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v5