From 8451769efdba4deaf7be11d66bdfba0375b68ba4 Mon Sep 17 00:00:00 2001 From: Ku6epXBOCTuK Date: Sat, 12 Sep 2026 13:32:39 +0500 Subject: [PATCH] ci: add githup pages deploy script --- .github/workflows/deploy.yml | 64 ++++++++++++++++++++++++++++++++++++ 1 file changed, 64 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..21bbcc8 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,64 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: pages + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: ^11.20.0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + cache-dependency-path: web/pnpm-lock.yaml + + - name: Configure Pages + uses: actions/configure-pages@v5 + + - name: Install dependencies + working-directory: web + run: pnpm install --frozen-lockfile + + - name: Build + working-directory: web + run: pnpm build + env: + BASE_PATH: /easy-png-tools + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: web/build + + deploy: + needs: build + runs-on: ubuntu-latest + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file