Skip to content

Commit

Permalink
Add cloudflare pages deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
Naught0 committed Jan 11, 2024
1 parent 5484781 commit f1dd7cc
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on: [push]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Add pnpm
run: yarn global add pnpm

- name: Install deps
run: pnpm install

- name: Vite build
run: pnpm build

- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: a5854f55e71b087aa3a3bcdae74b2489
projectName: combinator
directory: "./dist"
# Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
# Optional: Switch what branch you are publishing to.
# By default this will be the branch which triggered this workflow
branch: master
# Optional: Change the working directory
workingDirectory: frontend
# Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta`
wranglerVersion: "3"

0 comments on commit f1dd7cc

Please sign in to comment.