Ajout du workflow GitHub Actions pour déploiement Cloudflare Pages
Some checks are pending
Deploy to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Waiting to run
Some checks are pending
Deploy to Cloudflare Pages / Build and Deploy to Cloudflare Pages (push) Waiting to run
Configure le déploiement automatique via Direct Upload pour contourner les limites de temps de build de Cloudflare Pages. Le build est effectué sur GitHub Actions avant le déploiement.
This commit is contained in:
parent
7af29ab6e5
commit
83753de00d
1 changed files with 38 additions and 0 deletions
38
.github/workflows/deploy.yml
vendored
Normal file
38
.github/workflows/deploy.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: Deploy to Cloudflare Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
deployments: write
|
||||
name: Build and Deploy to Cloudflare Pages
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build site
|
||||
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 build --project-name=blog-tech
|
||||
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue