-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (46 loc) · 1.21 KB
/
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
50
51
52
name: Deploy to production
env:
PROJECT_NAME: rustlings
on:
workflow_dispatch:
push:
branches:
- main
paths:
- ".github/workflows/deploy.yml"
- "package.json"
- "tsconfig.json"
- "nuxt.config.ts"
- "tailwind.config.js"
- "app.vue"
- "components/**"
- "content/**"
- "public/**"
- "layouts/**"
- "server/**"
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Deps
run: npm install
- name: Build
run: npm run build --preset=cloudflare_pages
- uses: actions/upload-artifact@v4
with:
name: ${{env.PROJECT_NAME}}-dist
path: ./dist/
- name: Deploy
uses: cloudflare/wrangler-action@v3
# env:
# YOUR_SECRET: ${{ secrets.YOUR_SECRET }}
# YOUR_OTHER_SECRET: ${{ secrets.YOUR_OTHER_SECRET }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./dist --project-name "${{ env.PROJECT_NAME }}"
# secrets: |
# YOUR_SECRET
# YOUR_OTHER_SECRET