-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (48 loc) · 1.74 KB
/
example.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
name: Deploy Example Website
on:
push:
branches: [main]
workflow_dispatch:
inputs:
pages-branch:
description: |
Which Pages branch to deploy to.
Set this to the default branch (usually `main`) if you want to deploy to production.
And `preview` for anything else'
required: true
type: choice
default: 'main'
options:
- 'main'
- 'preview'
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Deploy
# uses: ./
uses: trufflehq/pages-turbo-workspace-action@main
with:
# The script to build your site (joins with `yarn workspace $workspace_name`) (default: `build`)
build-script: build
# Cloudflare Account ID
cloudflare-account-id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# Cloudflare API Token
cloudflare-api-token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# The directory of static assets to upload (default: `dist`)
directory: dist
# GitHub Token
github-token: ${{ secrets.GITHUB_TOKEN }}
# Optional: The script to run before building your site
prebuild-script: yarn build
# Optional: The branch to deploy to production
production-branch: ${{ github.event.repository.default_branch }}
# The name of the Cloudflare Pages project
project-name: ptw-example
# The name of the yarn workspace being deployed
workspace-name: web
# The branch to deploy to in the cloudflare project
deploy-to-branch: ${{ github.event.inputs.pages-branch || github.ref_name }}