Add Tenzir Helm Charts to the changelog #3428
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build & Deploy | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write # needed for committing changes | |
| pages: write | |
| id-token: write | |
| pull-requests: write # needed for commenting on PRs | |
| actions: write | |
| concurrency: | |
| group: "pages-${{ github.ref }}" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # needed for checking changes and pushing | |
| submodules: recursive | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Restore Astro cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .astro | |
| key: astro-${{ runner.os }}-${{ hashFiles('bun.lockb', 'package.json', 'astro.config.mjs') }} | |
| restore-keys: | | |
| astro-${{ runner.os }}- | |
| - name: Generate changelog | |
| run: bun run generate:changelog | |
| - name: Generate Excalidraw SVGs | |
| run: bun run generate:excalidraw | |
| - name: Setup GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build with Astro | |
| run: | | |
| if [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| # Skip link checking for PR previews - the validator doesn't handle | |
| # non-root base paths, and main branch builds catch broken links. | |
| bun run astro build \ | |
| --site "https://preview.docs.tenzir.com" \ | |
| --base "/${{ github.event.pull_request.number }}" | |
| else | |
| CHECK_LINKS=true LLMS_TXT=true bun run astro build \ | |
| --site "${{ steps.pages.outputs.origin }}" \ | |
| --base "${{ steps.pages.outputs.base_path }}" | |
| fi | |
| - name: Write PR preview marker | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| mkdir -p pr | |
| printf '%s\n' '${{ github.event.pull_request.number }}' > pr/number | |
| printf '%s\n' '${{ github.event.pull_request.head.sha }}' > pr/sha | |
| jq -n \ | |
| --argjson pr '${{ github.event.pull_request.number }}' \ | |
| --arg sha '${{ github.event.pull_request.head.sha }}' \ | |
| '{pr: $pr, sha: $sha}' > dist/__preview.json | |
| - name: Upload PR artifact | |
| if: github.event_name == 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-preview | |
| path: | | |
| dist | |
| pr | |
| retention-days: 1 | |
| - name: Upload artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| # The upload-pages-artifact action filters to web-servable content only | |
| # (HTML, CSS, JS, images), stripping raw .md files. The Release job needs | |
| # these markdown files to publish the markdown bundles, so we upload them | |
| # separately. | |
| # Note: The glob pattern roots at dist/, so files are stored without the | |
| # dist/ prefix and must be downloaded to dist/ in the Release job. | |
| - name: Upload markdown files for release | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: markdown-files | |
| path: dist/**/*.md | |
| retention-days: 1 | |
| deploy: | |
| name: Deploy | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| release: | |
| name: Release | |
| if: github.ref == 'refs/heads/main' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: github-pages | |
| path: artifact | |
| - name: Extract artifact | |
| run: | | |
| mkdir -p dist | |
| tar -xf artifact/artifact.tar -C dist | |
| - name: Download markdown files | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: markdown-files | |
| path: dist | |
| - name: Fix index.md naming | |
| run: | | |
| [ -f dist/.md ] && mv dist/.md dist/index.md || true | |
| - name: Generate markdown bundles | |
| run: | | |
| node scripts/generate-docs.mjs \ | |
| --input dist \ | |
| --bundle-dir bundle \ | |
| --output tenzir-docs.md \ | |
| --tarball tenzir-docs.tar.gz | |
| - name: Delete existing release assets | |
| run: | | |
| gh release view latest --json assets -q '.assets[].name' 2>/dev/null | while read -r asset; do | |
| gh release delete-asset latest "$asset" --yes | |
| done || true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set timestamp | |
| run: echo "TIMESTAMP=$(date -u '+%Y-%m-%d %H:%M UTC')" >> "$GITHUB_ENV" | |
| - name: Update release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: latest | |
| name: Tenzir Documentation | |
| body: | | |
| The complete docs in structured Markdown. Built for MCP servers, AI assistants, or those who just like it plain. | |
| **Download:** | |
| - 📦 [`tenzir-docs.tar.gz`](https://github.com/tenzir/docs/releases/download/latest/tenzir-docs.tar.gz): Structured directory of markdown files | |
| - 📄 [`tenzir-docs.md`](https://github.com/tenzir/docs/releases/download/latest/tenzir-docs.md): Single file with proper heading hierarchy | |
| *Auto-generated on ${{ env.TIMESTAMP }} from commit [`${{ github.sha }}`](https://github.com/tenzir/docs/commit/${{ github.sha }})* | |
| files: | | |
| tenzir-docs.tar.gz | |
| tenzir-docs.md | |
| make_latest: true | |
| - name: Generate app token | |
| id: app-token | |
| uses: actions/create-github-app-token@v1 | |
| with: | |
| app-id: ${{ vars.TENZIR_GITHUB_APP_ID }} | |
| private-key: ${{ secrets.TENZIR_GITHUB_APP_PRIVATE_KEY }} | |
| owner: tenzir | |
| - name: Trigger skills rebuild | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} | |
| run: | | |
| gh workflow run sync-docs-skill.yaml \ | |
| --repo tenzir/skills \ | |
| --field docs_tag=latest \ | |
| --field docs_sha="${{ github.sha }}" |