diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..55837906 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,44 @@ +name: Deploy Docs +on: + push: + branches: [ main ] + +jobs: + deploy: + name: Cloudflare Pages Deployment + if: > + github.repository == 'QwikDev/partytown' + runs-on: ubuntu-latest + permissions: + contents: read + deployments: write + + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + + - uses: pnpm/action-setup@v4.0.0 + + - name: Setup Node + uses: actions/setup-node@v4.0.2 + with: + node-version: 20.10.0 + cache: 'pnpm' + registry-url: https://registry.npmjs.org/ + + - run: corepack enable + + - name: Install NPM Dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm build.site + + - name: Deploy to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + projectName: partytown-docs + directory: dist + gitHubToken: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file