diff --git a/.github/workflows/cleanup-vercel-previews.yml b/.github/workflows/cleanup-vercel-previews.yml deleted file mode 100644 index 8f0d18f868..0000000000 --- a/.github/workflows/cleanup-vercel-previews.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: Clean up PR previews on Vercel - -on: - pull_request_target: - branches: [master] - types: [closed] - schedule: - - cron: "0 7 * * *" - workflow_dispatch: - -permissions: - contents: read - pull-requests: write - -env: - VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ vars.VERCEL_DOCS_PROJECT_ID }} - VERCEL_TEAM_SLUG: metaboat - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - -jobs: - cleanup: - name: Clean up preview - if: github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-latest - timeout-minutes: 15 - concurrency: - group: vercel-docs-preview-pr-${{ github.event.pull_request.number }} - cancel-in-progress: false - env: - GH_TOKEN: ${{ github.token }} - PR_NUMBER: ${{ github.event.pull_request.number }} - steps: - - name: Check out trusted cleanup code - uses: actions/checkout@v7 - with: - ref: ${{ github.event.repository.default_branch }} - persist-credentials: false - - uses: oven-sh/setup-bun@v2 - with: - bun-version-file: package.json - - name: Install workspace packages - run: bun install --frozen-lockfile - - name: Remove the preview alias and tagged deployments - run: bun tools/vercel/previews.ts cleanup - - sweep: - name: Sweep previews - if: github.event_name != 'pull_request_target' - runs-on: ubuntu-latest - timeout-minutes: 30 - permissions: - contents: read - pull-requests: read - concurrency: - group: vercel-docs-preview-sweep - cancel-in-progress: false - env: - GH_TOKEN: ${{ github.token }} - MAX_AGE_DAYS: "14" - steps: - - uses: actions/checkout@v7 - with: - ref: ${{ github.event.repository.default_branch }} - persist-credentials: false - - uses: oven-sh/setup-bun@v2 - with: - bun-version-file: package.json - - name: Install workspace packages - run: bun install --frozen-lockfile - - name: Remove preview deployments older than MAX_AGE_DAYS - run: bun tools/vercel/previews.ts sweep diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml deleted file mode 100644 index bc64b6fca6..0000000000 --- a/.github/workflows/deploy-vercel.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: Deploy to Vercel - -on: - pull_request: - branches: [master] - types: [opened, synchronize, reopened] - push: - branches: [master] - schedule: - # Nightly rebuild, so production picks up docs changes from metabase release branches. - - cron: "0 2 * * *" - workflow_dispatch: - -permissions: - contents: read - -env: - ASTRO_TELEMETRY_DISABLED: "1" - VERCEL_CLI_VERSION: "59.16.0" - VERCEL_ORG_ID: ${{ vars.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ vars.VERCEL_DOCS_PROJECT_ID }} - VERCEL_TEAM_SLUG: metaboat - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} - -jobs: - preview: - name: Preview - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login != 'dependabot[bot]' && github.actor != 'dependabot[bot]' - runs-on: ubuntu-latest - timeout-minutes: 20 - # The deploy script re-reads the PR before moving the stable preview address. - permissions: - contents: read - pull-requests: write - concurrency: - group: vercel-docs-preview-pr-${{ github.event.pull_request.number }} - cancel-in-progress: true - env: - COMMIT_AUTHOR: ${{ github.event.pull_request.user.login }} - COMMIT_MESSAGE: ${{ github.event.pull_request.title }} - DEPLOY_ENV: staging - GH_TOKEN: ${{ github.token }} - PR_BRANCH: ${{ github.head_ref }} - PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} - PR_NUMBER: ${{ github.event.pull_request.number }} - steps: - - uses: actions/checkout@v7 - with: - ref: ${{ github.sha }} - persist-credentials: false - - uses: actions/setup-node@v7 - with: - node-version: "24" - - uses: oven-sh/setup-bun@v2 - with: - bun-version-file: package.json - - name: Install workspace packages - run: bun install --frozen-lockfile - - name: Post the preview comment - id: preview-comment - run: bun tools/vercel/preview-comment.ts start - - name: Install Vercel CLI - run: npm install --global "vercel@$VERCEL_CLI_VERSION" - - name: Pull preview settings - run: vercel pull --yes --environment=preview --git-branch="$PR_BRANCH" - - name: Check the Vercel project root is repository root - run: bun tools/vercel/check-project.ts - - name: Build preview - env: - GITHUB_TOKEN: ${{ github.token }} - run: vercel build - - name: Deploy preview - run: bun tools/vercel/deploy.ts preview - - name: Update the preview comment - if: ${{ always() && steps.preview-comment.outcome == 'success' }} - run: bun tools/vercel/preview-comment.ts finish - - production: - name: Production - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - timeout-minutes: 20 - concurrency: - group: vercel-docs-production - cancel-in-progress: false - env: - COMMIT_AUTHOR: ${{ github.event.head_commit.author.name || github.actor }} - COMMIT_MESSAGE: ${{ github.event.head_commit.message || github.sha }} - DEPLOY_ENV: production - steps: - - uses: actions/checkout@v7 - with: - persist-credentials: false - - uses: actions/setup-node@v7 - with: - node-version: "24" - - uses: oven-sh/setup-bun@v2 - with: - bun-version-file: package.json - - name: Install workspace packages - run: bun install --frozen-lockfile - - name: Install Vercel CLI - run: npm install --global "vercel@$VERCEL_CLI_VERSION" - - name: Pull production settings - run: vercel pull --yes --environment=production - - name: Check the Vercel project root is repository root - run: bun tools/vercel/check-project.ts - - name: Build production - env: - GITHUB_TOKEN: ${{ github.token }} - run: vercel build --prod - - name: Deploy production - run: bun tools/vercel/deploy.ts production diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0be30796ad..24d0ba3e54 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,4 +35,5 @@ jobs: - run: bun run lint-styles - run: bun run lint-scripts - run: bun run test - - run: bun run test-vercel + # deploy-vercel.yml removed during archive + # - run: bun run test-vercel diff --git a/.github/workflows/update-redirects.yml b/.github/workflows/update-redirects.yml deleted file mode 100644 index d5cb865219..0000000000 --- a/.github/workflows/update-redirects.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Update Redirects - -on: - workflow_dispatch: - pull_request: - paths: - - redirects.json - - .github/workflows/update-redirects.yml - push: - branches: - - master - paths: - - redirects.json - - .github/workflows/update-redirects.yml - -env: - STAGING_APP_ID: dkkh35gceu2po - PROD_APP_ID: d1c991nkitx5oc - -concurrency: - group: update-redirects-${{ github.ref == 'refs/heads/master' && 'prod' || 'staging' }} - cancel-in-progress: true - -permissions: - id-token: write - contents: read - -jobs: - update: - runs-on: ubuntu-latest - timeout-minutes: 5 - steps: - - uses: actions/checkout@v6 - with: - sparse-checkout: redirects.json - - - name: Check redirects.json - run: | - if ! jq -e . redirects.json > /dev/null; then - echo "Invalid JSON in redirects.json" - exit 1 - fi - - - name: Get App Id & Deploy Role - run: | # sh - if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then - echo "APP_ID=${{ env.PROD_APP_ID }}" >> $GITHUB_ENV - echo "DEPLOY_ROLE=${{ secrets.AMPLIFY_DEPLOY_ROLE_PROD }}" >> $GITHUB_ENV - else - echo "APP_ID=${{ env.STAGING_APP_ID }}" >> $GITHUB_ENV - echo "DEPLOY_ROLE=${{ secrets.AMPLIFY_DEPLOY_ROLE_DEV }}" >> $GITHUB_ENV - fi - - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ env.DEPLOY_ROLE }} - aws-region: us-east-1 - - - name: Deploy redirects.json to Amplify - run: | - RULES=$(jq -c . redirects.json) - aws amplify update-app \ - --app-id "$APP_ID" \ - --custom-rules "$RULES" - - - - diff --git a/.github/workflows/update-version-support.yml b/.github/workflows/update-version-support.yml deleted file mode 100644 index 2493478e2f..0000000000 --- a/.github/workflows/update-version-support.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Update version support data - -on: - workflow_dispatch: - schedule: - # Nightly, an hour before the nightly docs update - - cron: "0 1 * * *" - -run-name: Nightly version support update - -permissions: - contents: read - pull-requests: write - -env: - VERSION_INFO_URL: https://static.metabase.com/version-info.json - DATA_FILE: _data/major_version_support.json - -concurrency: - group: update-version-support - cancel-in-progress: false - -jobs: - update: - name: Update major_version_support.json - runs-on: ubuntu-latest - timeout-minutes: 10 - env: - GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }} - BRANCH_NAME: update-version-support-${{ github.run_id }} - steps: - - uses: actions/checkout@v6 - with: - ref: master - token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }} - - - name: Fetch major_version_support from version-info.json - run: | - curl --fail --silent --show-error --retry 3 --retry-delay 5 \ - "$VERSION_INFO_URL" -o version-info.json - - # Bail out rather than commit garbage if the key is missing or empty - if ! jq -e '.major_version_support | arrays and length > 0' version-info.json > /dev/null; then - echo "::error::major_version_support is missing or empty in $VERSION_INFO_URL" - exit 1 - fi - - # Every entry needs a numeric major, otherwise the docs templates can't match on it - if ! jq -e '.major_version_support | all(.major | numbers)' version-info.json > /dev/null; then - echo "::error::every major_version_support entry must have a numeric \"major\"" - exit 1 - fi - - jq '.major_version_support' version-info.json > "$DATA_FILE" - rm version-info.json - - - name: Check for changes - id: diff - run: | - if git diff --quiet -- "$DATA_FILE"; then - echo "changed=false" >> "$GITHUB_OUTPUT" - echo "No changes to $DATA_FILE" - else - echo "changed=true" >> "$GITHUB_OUTPUT" - git --no-pager diff -- "$DATA_FILE" - fi - - - name: Push the update - if: steps.diff.outputs.changed == 'true' - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - git checkout -B "$BRANCH_NAME" - git add "$DATA_FILE" - git commit -m "Update major version support data" - git push --force origin "$BRANCH_NAME" - - - name: Open PR and enable automerge - id: create_pr - if: steps.diff.outputs.changed == 'true' - run: | # sh - DATE=$(date +'%Y-%m-%d') - - URL=$(gh pr create \ - --base master \ - --head "$BRANCH_NAME" \ - --title "Update version support data $DATE" \ - --body "Automated nightly update of major version support data.") - - echo "pr_number=${URL##*/}" >> "$GITHUB_OUTPUT" - gh pr merge --squash --auto "$URL" - - - name: Auto approve PR - if: steps.diff.outputs.changed == 'true' - env: - # Must be GITHUB_TOKEN, not the job's PAT: the PAT opened the PR and - # GitHub rejects self-approval. - GH_TOKEN: ${{ github.token }} - run: gh pr review "${{ steps.create_pr.outputs.pr_number }}" --approve diff --git a/README.md b/README.md index 1986044b0b..3d42dcbc84 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # Metabase docs site +> [!IMPORTANT] +> **This repository is archived.** The docs site now lives in [`apps/docs`](https://github.com/metabase/metabase.github.io/tree/master/apps/docs) in the [metabase/metabase.github.io](https://github.com/metabase/metabase.github.io) monorepo. +> The docs content itself is still in [metabase/metabase](https://github.com/metabase/metabase/tree/master/docs). + An Astro site that renders the Metabase docs. ## Quick start