From d327fc3ee514f960dad924f43bbc1f67e0da2806 Mon Sep 17 00:00:00 2001 From: syui Date: Thu, 15 Jan 2026 17:47:05 +0900 Subject: [PATCH] add gh-actions --- .github/workflows/cf-pages.yml | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cf-pages.yml diff --git a/.github/workflows/cf-pages.yml b/.github/workflows/cf-pages.yml new file mode 100644 index 0000000..1b694b4 --- /dev/null +++ b/.github/workflows/cf-pages.yml @@ -0,0 +1,36 @@ +name: Deploy to Cloudflare Pages + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} + directory: dist + gitHubToken: ${{ secrets.GITHUB_TOKEN }}