-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.14 KB
/
cf-pages-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: 'Deploy to Cloudflare Pages'
on:
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: 'cf-pages'
cancel-in-progress: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Publish to Cloudflare Pages
environment:
name: Production
url: ${{ steps.publish.outputs.url }}
steps:
- name: Checkout
uses: actions/checkout@v3
# Run a build step here if your project requires
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 22.9.0
- name: build
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: |
corepack enable
yarn
yarn build
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: publish
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 535c9adaae9f1f866fbf86b609b76f30
projectName: homepage
directory: build
branch: main