Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(ci): missing deployment secrets in reusable action
Elian Doran9b37708f0cf4
diff --git a/.github/actions/deploy-to-cloudflare-pages/action.yml b/.github/actions/deploy-to-cloudflare-pages/action.ymlindex c449af272f..4f7a4a177a 100644--- a/.github/actions/deploy-to-cloudflare-pages/action.yml+++ b/.github/actions/deploy-to-cloudflare-pages/action.yml@@ -13,6 +13,15 @@ inputs:deploy_dir:description: "The directory from which to deploy."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: trueruns:using: compositesteps:@@ -27,8 +36,8 @@ runs:if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'uses: cloudflare/wrangler-action@v3with:- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}+ apiToken: ${{ inputs.cloudflare_api_token }}+ accountId: ${{ inputs.cloudflare_account_id }}command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=${{ github.ref_name }}wranglerVersion: '' # Use pre-installed version@@ -38,8 +47,8 @@ runs:if: github.event_name == 'pull_request'uses: cloudflare/wrangler-action@v3with:- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}+ apiToken: ${{ inputs.cloudflare_api_token }}+ accountId: ${{ inputs.cloudflare_account_id }}command: pages deploy ${{ inputs.deploy_dir }} --project-name=${{ inputs.project_name}} --branch=pr-${{ github.event.pull_request.number }}wranglerVersion: '' # Use pre-installed version@@ -52,7 +61,7 @@ runs:PRODUCTION_URL: ${{ inputs.production_url }}PROJECT_NAME: ${{ inputs.project_name }}with:- github-token: ${{ secrets.GITHUB_TOKEN }}+ github-token: ${{ inputs.github_token }}script: |const prNumber = context.issue.number;// Construct preview URL based on Cloudflare Pages patterndiff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.ymlindex e0c91ac407..6abd9af47e 100644--- a/.github/workflows/deploy-docs.yml+++ b/.github/workflows/deploy-docs.yml@@ -123,3 +123,6 @@ jobs:comment_body: "π Documentation preview is ready"production_url: "https://docs.triliumnotes.org"deploy_dir: "site"+ cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}+ cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}+ github_token: ${{ secrets.GITHUB_TOKEN }}diff --git a/.github/workflows/website.yml b/.github/workflows/website.ymlindex 8cd58460d2..83b96cc0e2 100644--- a/.github/workflows/website.yml+++ b/.github/workflows/website.yml@@ -38,3 +38,6 @@ jobs:comment_body: "π Website preview is ready"production_url: "https://triliumnotes.org"deploy_dir: "apps/website/dist"+ cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}+ cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}+ github_token: ${{ secrets.GITHUB_TOKEN }}