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