mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(ci): missing deployment secrets in reusable action
This commit is contained in:
parent
7386bb35e5
commit
9b37708f0c
@ -13,6 +13,15 @@ inputs:
|
|||||||
deploy_dir:
|
deploy_dir:
|
||||||
description: "The directory from which to deploy."
|
description: "The directory from which to deploy."
|
||||||
required: true
|
required: true
|
||||||
|
cloudflare_api_token:
|
||||||
|
description: "The Cloudflare API token to use for deployment."
|
||||||
|
required: true
|
||||||
|
cloudflare_account_id:
|
||||||
|
description: "The Cloudflare account ID to use for deployment."
|
||||||
|
required: true
|
||||||
|
github_token:
|
||||||
|
description: "The GitHub token to use for posting PR comments."
|
||||||
|
required: true
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
@ -27,8 +36,8 @@ runs:
|
|||||||
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ inputs.cloudflare_api_token }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ inputs.cloudflare_account_id }}
|
||||||
command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=${{ github.ref_name }}
|
command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=${{ github.ref_name }}
|
||||||
wranglerVersion: '' # Use pre-installed version
|
wranglerVersion: '' # Use pre-installed version
|
||||||
|
|
||||||
@ -38,8 +47,8 @@ runs:
|
|||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
uses: cloudflare/wrangler-action@v3
|
uses: cloudflare/wrangler-action@v3
|
||||||
with:
|
with:
|
||||||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
apiToken: ${{ inputs.cloudflare_api_token }}
|
||||||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
accountId: ${{ inputs.cloudflare_account_id }}
|
||||||
command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=pr-${{ github.event.pull_request.number }}
|
command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=pr-${{ github.event.pull_request.number }}
|
||||||
wranglerVersion: '' # Use pre-installed version
|
wranglerVersion: '' # Use pre-installed version
|
||||||
|
|
||||||
@ -52,7 +61,7 @@ runs:
|
|||||||
PRODUCTION_URL: ${{ inputs.production_url }}
|
PRODUCTION_URL: ${{ inputs.production_url }}
|
||||||
PROJECT_NAME: ${{ inputs.project_name }}
|
PROJECT_NAME: ${{ inputs.project_name }}
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ inputs.github_token }}
|
||||||
script: |
|
script: |
|
||||||
const prNumber = context.issue.number;
|
const prNumber = context.issue.number;
|
||||||
// Construct preview URL based on Cloudflare Pages pattern
|
// Construct preview URL based on Cloudflare Pages pattern
|
||||||
|
3
.github/workflows/deploy-docs.yml
vendored
3
.github/workflows/deploy-docs.yml
vendored
@ -123,3 +123,6 @@ jobs:
|
|||||||
comment_body: "📚 Documentation preview is ready"
|
comment_body: "📚 Documentation preview is ready"
|
||||||
production_url: "https://docs.triliumnotes.org"
|
production_url: "https://docs.triliumnotes.org"
|
||||||
deploy_dir: "site"
|
deploy_dir: "site"
|
||||||
|
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
3
.github/workflows/website.yml
vendored
3
.github/workflows/website.yml
vendored
@ -38,3 +38,6 @@ jobs:
|
|||||||
comment_body: "📚 Website preview is ready"
|
comment_body: "📚 Website preview is ready"
|
||||||
production_url: "https://triliumnotes.org"
|
production_url: "https://triliumnotes.org"
|
||||||
deploy_dir: "apps/website/dist"
|
deploy_dir: "apps/website/dist"
|
||||||
|
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
|
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user