Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f22edfa95 |
+19
-12
@@ -3,22 +3,29 @@ name: Deploy to Cloudflare Pages
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:22
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: git clone --depth 1 --branch main https://git.ampbox.io/${{ github.repository }}.git .
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Build and deploy
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
npx wrangler pages deploy dist/ --project-name=crashtestdev
|
||||
env:
|
||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to Cloudflare Pages
|
||||
uses: cloudflare/wrangler-action@v3
|
||||
with:
|
||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||
command: pages deploy dist/ --project-name=crashtestdev
|
||||
Reference in New Issue
Block a user