deploy_docs.yml

 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@93cb6efe18208431cddfb8368fd83d5badbf9bfd
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@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
27      with:
28        cache: rust
29        path: ~/.rustup
30    - name: steps::setup_linux
31      run: ./script/linux
32    - name: steps::download_wasi_sdk
33      run: ./script/download-wasi-sdk
34    - name: ./script/generate-action-metadata
35      run: ./script/generate-action-metadata
36    - name: deploy_docs::lychee_link_check
37      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
38      with:
39        args: --no-progress --exclude '^http' './docs/src/**/*'
40        fail: true
41        jobSummary: false
42    - name: deploy_docs::install_mdbook
43      uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
44      with:
45        mdbook-version: 0.4.37
46    - name: deploy_docs::build_docs_book
47      run: |
48        mkdir -p target/deploy
49        mdbook build ./docs --dest-dir=../target/deploy/docs/
50    - name: deploy_docs::lychee_link_check
51      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
52      with:
53        args: --no-progress --exclude '^http' 'target/deploy/docs'
54        fail: true
55        jobSummary: false
56    - name: deploy_docs::deploy_docs_to_pages
57      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
58      with:
59        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
60        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
61        command: pages deploy target/deploy --project-name=docs
62    - name: deploy_docs::deploy_install_script
63      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
64      with:
65        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
66        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
67        command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
68    - name: deploy_docs::deploy_docs_worker
69      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
70      with:
71        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
72        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
73        command: deploy .cloudflare/docs-proxy/src/worker.js
74    - name: deploy_docs::upload_wrangler_logs
75      if: always()
76      uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
77      with:
78        name: wrangler_logs
79        path: /home/runner/.config/.wrangler/logs/
80    timeout-minutes: 60
81defaults:
82  run:
83    shell: bash -euxo pipefail {0}