deploy / deploy (push) Has been cancelled
generate / generate (push) Has been cancelled
nix-eval / nix-eval (push) Has been cancelled
publish / version (push) Has been cancelled
publish / build-cli (push) Has been cancelled
publish / sign-cli-windows (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=arm64 host:macos-26 platform_flag:--mac --arm64 target:aarch64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[bun_install_flags:--os=darwin --cpu=x64 host:macos-26-intel platform_flag:--mac --x64 target:x86_64-apple-darwin]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404 platform_flag:--linux target:x86_64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-ubuntu-2404-arm platform_flag:--linux --arm64 target:aarch64-unknown-linux-gnu]) (push) Has been cancelled
publish / build-electron (map[host:blacksmith-4vcpu-windows-2025 platform_flag:--win target:x86_64-pc-windows-msvc]) (push) Has been cancelled
publish / build-electron (map[host:windows-2025 platform_flag:--win --arm64 target:aarch64-pc-windows-msvc]) (push) Has been cancelled
publish / publish (push) Has been cancelled
test / unit (linux) (push) Has been cancelled
test / unit (windows) (push) Has been cancelled
test / e2e (linux) (push) Has been cancelled
test / e2e (windows) (push) Has been cancelled
typecheck / typecheck (push) Has been cancelled
compliance-close / close-non-compliant (push) Has been cancelled
beta / sync (push) Has been cancelled
containers / build (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404, x86_64-linux) (push) Has been cancelled
nix-hashes / compute-hash (blacksmith-4vcpu-ubuntu-2404-arm, aarch64-linux) (push) Has been cancelled
nix-hashes / compute-hash (macos-15-intel, x86_64-darwin) (push) Has been cancelled
nix-hashes / compute-hash (macos-latest, aarch64-darwin) (push) Has been cancelled
storybook / storybook build (push) Has been cancelled
nix-hashes / update-hashes (push) Has been cancelled
This reverts commit 5beb7d367d.
73 lines
2.8 KiB
YAML
73 lines
2.8 KiB
YAML
name: docs-update
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 */12 * * *"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
LOOKBACK_HOURS: 4
|
|
|
|
jobs:
|
|
update-docs:
|
|
if: github.repository == 'sst/opencode'
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
permissions:
|
|
id-token: write
|
|
contents: write
|
|
pull-requests: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
|
with:
|
|
fetch-depth: 0 # Fetch full history to access commits
|
|
|
|
- name: Setup Bun
|
|
uses: ./.github/actions/setup-bun
|
|
|
|
- name: Get recent commits
|
|
id: commits
|
|
run: |
|
|
COMMITS=$(git log --since="${{ env.LOOKBACK_HOURS }} hours ago" --pretty=format:"- %h %s" 2>/dev/null || echo "")
|
|
if [ -z "$COMMITS" ]; then
|
|
echo "No commits in the last ${{ env.LOOKBACK_HOURS }} hours"
|
|
echo "has_commits=false" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "has_commits=true" >> $GITHUB_OUTPUT
|
|
{
|
|
echo "list<<EOF"
|
|
echo "$COMMITS"
|
|
echo "EOF"
|
|
} >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Run opencode
|
|
if: steps.commits.outputs.has_commits == 'true'
|
|
uses: sst/opencode/github@2c14fc5586fe0b88e5c04732d2e846769cc35671 # latest
|
|
env:
|
|
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
|
with:
|
|
model: opencode/gpt-5.2
|
|
agent: docs
|
|
prompt: |
|
|
Review the following commits from the last ${{ env.LOOKBACK_HOURS }} hours and identify any new features that may need documentation.
|
|
|
|
<recent_commits>
|
|
${{ steps.commits.outputs.list }}
|
|
</recent_commits>
|
|
|
|
Steps:
|
|
1. For each commit that looks like a new feature or significant change:
|
|
- Read the changed files to understand what was added
|
|
- Check if the feature is already documented in packages/web/src/content/docs/*
|
|
2. If you find undocumented features:
|
|
- Update the relevant documentation files in packages/web/src/content/docs/*
|
|
- Follow the existing documentation style and structure
|
|
- Make sure to document the feature clearly with examples where appropriate
|
|
3. If all new features are already documented, report that no updates are needed
|
|
4. If you are creating a new documentation file be sure to update packages/web/astro.config.mjs too.
|
|
|
|
Focus on user-facing features and API changes. Skip internal refactors, bug fixes, and test updates unless they affect user-facing behavior.
|
|
Don't feel the need to document every little thing. It is perfectly okay to make 0 changes at all.
|
|
Try to keep documentation only for large features or changes that already have a good spot to be documented.
|