name: tutorials-youtube-sync on: # Daily sweep for new community YouTube tutorials about Open Design. New # candidates are posted to Feishu for a maintainer to review — this workflow # does NOT generate entries or open PRs. A maintainer replies with which # candidates to publish, and the selected videos are turned into entries via # scripts/youtube-tutorials/generate-selected.ts (run by a maintainer, who # opens the PR). schedule: - cron: '30 2 * * *' # Manual trigger: force a sweep outside the daily schedule. Leave days empty to # use the same gap-free watermark (since the last successful run) the schedule # uses; set it to force a fixed N-day catch-up window. workflow_dispatch: inputs: days: description: 'Override lookback window in days (blank = since last successful run)' required: false default: '' permissions: contents: read # Read this workflow's own run history to derive a gap-free window start. actions: read # Read open tutorial-submission issues and contribution PRs for the digest. issues: read pull-requests: read concurrency: group: tutorials-youtube-sync cancel-in-progress: true jobs: notify: name: Post tutorial candidates to Feishu if: github.repository == 'nexu-io/open-design' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6.0.2 - name: Setup Node uses: actions/setup-node@v4 with: node-version: '24' - name: Discover candidates and post Feishu digest working-directory: apps/landing-page env: GITHUB_TOKEN: ${{ github.token }} YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} ANTHROPIC_AUTH_TOKEN: ${{ secrets.ANTHROPIC_AUTH_TOKEN }} ANTHROPIC_BASE_URL: ${{ secrets.ANTHROPIC_BASE_URL }} FEISHU_TUTORIALS_WEBHOOK: ${{ secrets.FEISHU_TUTORIALS_WEBHOOK }} FEISHU_TUTORIALS_SECRET: ${{ secrets.FEISHU_TUTORIALS_SECRET }} DAYS_OVERRIDE: ${{ github.event.inputs.days }} run: | if [ -n "$DAYS_OVERRIDE" ]; then npx --yes tsx@4.22.3 scripts/youtube-tutorials/notify-candidates.ts --days "$DAYS_OVERRIDE" else npx --yes tsx@4.22.3 scripts/youtube-tutorials/notify-candidates.ts fi