Skip to content

Commit

Permalink
docs: add GH action to deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Nov 19, 2024
1 parent ef3af15 commit 97ce42d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]

- uses: pnpm/[email protected]

- name: Setup Node
uses: actions/[email protected]
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 }}

0 comments on commit 97ce42d

Please sign in to comment.