Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

ci(docs): replace removed cloudflare/pages-action with wrangler-action

Minh141120e88c2c792088
diff --git a/.github/workflows/jan-docs.yml b/.github/workflows/jan-docs.yml
index 2255458a3..3bc0d8dae 100644
--- a/.github/workflows/jan-docs.yml
+++ b/.github/workflows/jan-docs.yml
@@ -73,30 +73,27 @@ jobs:
- name: Publish to Cloudflare Pages PR Preview and Staging
if: github.event_name == 'pull_request'
- uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1
+ uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
- directory: ./docs/out
- # Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
+ wranglerVersion: "4"
+ command: pages deploy ./docs/out --project-name=${{ env.CLOUDFLARE_PROJECT_NAME }} --branch=${{ github.head_ref }}
id: deployCloudflarePages
- uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
if: github.event_name == 'pull_request'
with:
message: |
- Preview URL: ${{ steps.deployCloudflarePages.outputs.url }}
+ Preview URL: ${{ steps.deployCloudflarePages.outputs.deployment-url }}
- name: Publish to Cloudflare Pages Production
if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main') || (github.event_name == 'workflow_dispatch' && startsWith(github.ref, 'refs/heads/release/'))
- uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1
+ uses: cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4.0.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- projectName: ${{ env.CLOUDFLARE_PROJECT_NAME }}
- directory: ./docs/out
- branch: main
- # Optional: Enable this if you want to have GitHub Deployments triggered
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
+ wranglerVersion: "4"
+ command: pages deploy ./docs/out --project-name=${{ env.CLOUDFLARE_PROJECT_NAME }} --branch=main