Migrate Functions to Astro Endpoints. Use GPT-4o (#642) #194
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Cloudflare Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22.4 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build Application | |
run: pnpm run build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 86d0f9c865a19f85c06f8354b527805d | |
projectName: moiva | |
directory: dist | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |