-
Notifications
You must be signed in to change notification settings - Fork 29
43 lines (38 loc) · 1.06 KB
/
publish-cloudflare.yaml
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
name: Publish website to cloudflare
on:
workflow_dispatch:
push:
branches:
- "main"
paths:
- ".github/workflows/build-web.yaml"
- ".github/workflows/publish-cloudflare.yaml"
- ".vitepress/**"
- "src/**"
- "package.json"
- "pnpm-lock.yaml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
uses: ./.github/workflows/build-web.yaml
publish:
needs: build
runs-on: ubuntu-latest
environment: cloudflare-pages
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: website
path: website
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_PAGES_ACCOUNT }}
projectName: transky
directory: website
wranglerVersion: 3