Change summary
.cloudflare/README.md | 4
.github/actions/build_docs/action.yml | 46 -------------------
.github/workflows/deploy_cloudflare.yml | 64 ---------------------------
3 files changed, 2 insertions(+), 112 deletions(-)
Detailed changes
@@ -4,11 +4,11 @@ from Cloudflare.
- `open-source-website-assets` is used for `install.sh`
- `docs-proxy` is used for `https://zed.dev/docs`
-On push to `main`, both of these (and the files they depend on) are uploaded to Cloudflare.
+During docs deployments, both of these (and the files they depend on) are uploaded to Cloudflare.
### Deployment
-These functions are deployed on push to main by the deploy_cloudflare.yml workflow. Worker Rules in Cloudflare intercept requests to zed.dev and proxy them to the appropriate workers.
+These functions are deployed by the docs deployment workflows. Worker Rules in Cloudflare intercept requests to zed.dev and proxy them to the appropriate workers.
### Testing
@@ -1,46 +0,0 @@
-name: "Build docs"
-description: "Build the docs"
-
-runs:
- using: "composite"
- steps:
- - name: Setup mdBook
- uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08 # v2
- with:
- mdbook-version: "0.4.37"
-
- - name: Cache dependencies
- uses: swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- with:
- save-if: ${{ github.ref == 'refs/heads/main' }}
- # cache-provider: "buildjet"
-
- - name: Install Linux dependencies
- shell: bash -euxo pipefail {0}
- run: ./script/linux
-
- - name: Download WASI SDK
- shell: bash -euxo pipefail {0}
- run: ./script/download-wasi-sdk
-
- - name: Generate action metadata
- shell: bash -euxo pipefail {0}
- run: ./script/generate-action-metadata
-
- - name: Check for broken links (in MD)
- uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
- with:
- args: --no-progress --exclude '^http' './docs/src/**/*'
- fail: true
-
- - name: Build book
- shell: bash -euxo pipefail {0}
- run: |
- mkdir -p target/deploy
- mdbook build ./docs --dest-dir=../target/deploy/docs/
-
- - name: Check for broken links (in HTML)
- uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332 # v2.4.1
- with:
- args: --no-progress --exclude '^http' 'target/deploy/docs/'
- fail: true
@@ -1,64 +0,0 @@
-name: Deploy Docs
-
-on:
- push:
- branches:
- - main
-
-jobs:
- deploy-docs:
- name: Deploy Docs
- if: github.repository_owner == 'zed-industries'
- runs-on: namespace-profile-16x32-ubuntu-2204
-
- steps:
- - name: Checkout repo
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- with:
- clean: false
-
- - name: Set up default .cargo/config.toml
- run: cp ./.cargo/collab-config.toml ./.cargo/config.toml
-
- - name: Build docs
- uses: ./.github/actions/build_docs
- env:
- CC: clang
- CXX: clang++
- DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
- DOCS_CONSENT_IO_INSTANCE: ${{ secrets.DOCS_CONSENT_IO_INSTANCE }}
-
- - name: Deploy Docs
- uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
- with:
- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- command: pages deploy target/deploy --project-name=docs
-
- - name: Deploy Install
- uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
- with:
- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
-
- - name: Deploy Docs Workers
- uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
- with:
- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- command: deploy .cloudflare/docs-proxy/src/worker.js
-
- - name: Deploy Install Workers
- uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3
- with:
- apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- command: deploy .cloudflare/docs-proxy/src/worker.js
-
- - name: Preserve Wrangler logs
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
- if: always()
- with:
- name: wrangler_logs
- path: /home/runner/.config/.wrangler/logs/