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