msvc-kit 0.2.10

A portable MSVC Build Tools installer and manager for Rust development
name: Deploy Documentation

on:
  push:
    branches: [main]
    paths:
      - "docs/**"
      - "README.md"
      - "README_zh.md"
      - ".github/workflows/docs.yml"
  # Deploy on release published
  release:
    types: [published]
  # Allow manual trigger
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: pages
  cancel-in-progress: false

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - name: Setup vx
        uses: loonghao/vx@main
        with:
          version: '0.8.0'
          github-token: ${{ secrets.GITHUB_TOKEN }}

      - name: Setup tools (vx)
        run: vx setup

      - name: Install dependencies
        run: vx just docs-install

      - name: Build documentation
        run: vx just docs-build

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v4
        with:
          path: docs/.vitepress/dist

  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    needs: build
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4