Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T01:25:03.255Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

deploy_docs.yml

160 lines · 5.7 KB · yaml
1# Generated from xtask::workflows::deploy_docs
2# Rebuild with `cargo xtask workflows`.
3name: deploy_docs
4on:
5  workflow_call:
6    inputs:
7      channel:
8        description: channel
9        type: string
10        default: ''
11      checkout_ref:
12        description: checkout_ref
13        type: string
14        default: ''
15    secrets:
16      DOCS_AMPLITUDE_API_KEY:
17        description: DOCS_AMPLITUDE_API_KEY
18        required: true
19      DOCS_CONSENT_IO_INSTANCE:
20        description: DOCS_CONSENT_IO_INSTANCE
21        required: true
22      CLOUDFLARE_API_TOKEN:
23        description: CLOUDFLARE_API_TOKEN
24        required: true
25      CLOUDFLARE_ACCOUNT_ID:
26        description: CLOUDFLARE_ACCOUNT_ID
27        required: true
28  workflow_dispatch:
29    inputs:
30      channel:
31        description: 'Docs channel to deploy: nightly, preview, or stable'
32        type: string
33        default: ''
34      checkout_ref:
35        description: Git ref to checkout and deploy. Defaults to event SHA when omitted.
36        type: string
37        default: ''
38permissions:
39  contents: read
40jobs:
41  deploy_docs:
42    if: github.repository_owner == 'zed-industries'
43    name: Build and Deploy Docs
44    runs-on: namespace-profile-16x32-ubuntu-2204
45    env:
46      DOCS_AMPLITUDE_API_KEY: ${{ secrets.DOCS_AMPLITUDE_API_KEY }}
47      DOCS_CONSENT_IO_INSTANCE: ${{ secrets.DOCS_CONSENT_IO_INSTANCE }}
48      CC: clang
49      CXX: clang++
50    steps:
51    - id: resolve-channel
52      name: deploy_docs::resolve_channel_step
53      run: |
54        if [ -z "$CHANNEL" ]; then
55            if [ "$GITHUB_REF" = "refs/heads/main" ]; then
56                CHANNEL="nightly"
57            else
58                echo "::error::channel input is required when ref is not main."
59                exit 1
60            fi
61        fi
62
63        case "$CHANNEL" in
64            "nightly")
65                SITE_URL="/docs/nightly/"
66                PROJECT_NAME="docs-nightly"
67                ;;
68            "preview")
69                SITE_URL="/docs/preview/"
70                PROJECT_NAME="docs-preview"
71                ;;
72            "stable")
73                SITE_URL="/docs/"
74                PROJECT_NAME="docs"
75                ;;
76            *)
77                echo "::error::Invalid docs channel '$CHANNEL'. Expected one of: nightly, preview, stable."
78                exit 1
79                ;;
80        esac
81
82        {
83            echo "channel=$CHANNEL"
84            echo "site_url=$SITE_URL"
85            echo "project_name=$PROJECT_NAME"
86        } >> "$GITHUB_OUTPUT"
87      env:
88        CHANNEL: ${{ inputs.channel }}
89    - name: steps::checkout_repo
90      uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
91      with:
92        clean: false
93        ref: ${{ inputs.checkout_ref != '' && inputs.checkout_ref || github.sha }}
94    - name: steps::setup_cargo_config
95      run: |
96        mkdir -p ./../.cargo
97        cp ./.cargo/ci-config.toml ./../.cargo/config.toml
98    - name: steps::cache_rust_dependencies_namespace
99      uses: namespacelabs/nscloud-cache-action@a90bb5d4b27522ce881c6e98eebd7d7e6d1653f9
100      with:
101        cache: rust
102        path: ~/.rustup
103    - name: steps::setup_linux
104      run: ./script/linux
105    - name: steps::download_wasi_sdk
106      run: ./script/download-wasi-sdk
107    - name: ./script/generate-action-metadata
108      run: ./script/generate-action-metadata
109    - name: deploy_docs::lychee_link_check
110      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
111      with:
112        args: --no-progress --exclude '^http' './docs/src/**/*'
113        fail: true
114        jobSummary: false
115    - name: deploy_docs::install_mdbook
116      uses: peaceiris/actions-mdbook@ee69d230fe19748b7abf22df32acaa93833fad08
117      with:
118        mdbook-version: 0.4.37
119    - name: deploy_docs::build_docs_book
120      run: |
121        mkdir -p target/deploy
122        mdbook build ./docs --dest-dir=../target/deploy/docs/
123      env:
124        DOCS_CHANNEL: ${{ steps.resolve-channel.outputs.channel }}
125        MDBOOK_BOOK__SITE_URL: ${{ steps.resolve-channel.outputs.site_url }}
126    - name: deploy_docs::lychee_link_check
127      uses: lycheeverse/lychee-action@82202e5e9c2f4ef1a55a3d02563e1cb6041e5332
128      with:
129        args: --no-progress --exclude '^http' 'target/deploy/docs'
130        fail: true
131        jobSummary: false
132    - name: deploy_docs::docs_deploy_steps::deploy_to_cf_pages
133      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
134      with:
135        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
136        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
137        command: pages deploy target/deploy --project-name=${{ steps.resolve-channel.outputs.project_name }} --branch main
138    - name: deploy_docs::docs_deploy_steps::upload_install_script
139      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
140      with:
141        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
142        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
143        command: r2 object put -f script/install.sh zed-open-source-website-assets/install.sh
144    - name: deploy_docs::docs_deploy_steps::deploy_docs_worker
145      uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65
146      with:
147        apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
148        accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
149        command: deploy .cloudflare/docs-proxy/src/worker.js
150    - name: deploy_docs::docs_deploy_steps::upload_wrangler_logs
151      if: always()
152      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
153      with:
154        name: wrangler_logs
155        path: /home/runner/.config/.wrangler/logs/
156    timeout-minutes: 60
157defaults:
158  run:
159    shell: bash -euxo pipefail {0}
160
Served at tenant.openagents/omega Member data and write actions are omitted.