1# Generated from xtask::workflows::deploy_docs
2# Rebuild with `cargo xtask workflows`.
3name: deploy_docs
4on:
5 push:
6 branches:
7 - main
8 - staged-docs-releases
9jobs:
10 deploy_docs_job:
11 if: github.repository_owner == 'zed-industries'
12 name: Build and Deploy Docs
13 runs-on: namespace-profile-16x32-ubuntu-2204
14 env:
15 DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
16 steps:
17 - name: steps::checkout_repo
18 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
19 with:
20 clean: false
21 - name: steps::setup_cargo_config
22 run: |
23 mkdir -p ./../.cargo
24 cp ./.cargo/ci-config.toml ./../.cargo/config.toml
25 - name: steps::cache_rust_dependencies_namespace
26 uses: namespacelabs/nscloud-cache-action@v1
27 with:
28 cache: rust
29 path: ~/.rustup
30 - name: steps::setup_linux
31 run: ./script/linux
32 - name: steps::install_mold
33 run: ./script/install-mold
34 - name: steps::download_wasi_sdk
35 run: ./script/download-wasi-sdk
36 - name: ./script/generate-action-metadata
37 run: ./script/generate-action-metadata
38 - name: deploy_docs::lychee_link_check
39 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
40 with:
41 args: --no-progress --exclude '^http' './docs/src/**/*'
42 fail: true
43 jobSummary: false
44 - name: deploy_docs::install_mdbook
45 uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
46 with:
47 mdbook-version: 0.4.37
48 - name: deploy_docs::build_docs_book
49 run: |
50 mkdir -p target/deploy
51 mdbook build ./docs --dest-dir=../target/deploy/docs/
52 - name: deploy_docs::lychee_link_check
53 uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
54 with:
55 args: --no-progress --exclude '^http' 'target/deploy/docs'
56 fail: true
57 jobSummary: false
58 - name: deploy_docs::deploy_docs_to_pages
59 uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
60 with:
61 apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
62 accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
63 command: pages deploy target/deploy --project-name=docs
64 - name: deploy_docs::deploy_install_script
65 uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
66 with:
67 apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
68 accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
69 command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
70 - name: deploy_docs::deploy_docs_worker
71 uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
72 with:
73 apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
74 accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
75 command: deploy .cloudflare/docs-proxy/src/worker.js
76 - name: deploy_docs::upload_wrangler_logs
77 if: always()
78 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
79 with:
80 name: wrangler_logs
81 path: /home/runner/.config/.wrangler/logs/
82 timeout-minutes: 60
83defaults:
84 run:
85 shell: bash -euxo pipefail {0}