chore: bump version to 0.10.37 (#60) #21
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: Deploy Documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'README.md' # Monorepo root | |
| - 'CONTRIBUTING.md' # Monorepo root | |
| - 'LICENSE' # Monorepo root | |
| - 'extensions/git-id-switcher/README.md' # Extension root (English) | |
| - 'extensions/git-id-switcher/LICENSE' # Extension root | |
| - 'extensions/git-id-switcher/CHANGELOG.md' # Extension root | |
| - 'extensions/git-id-switcher/docs/**' # All language READMEs + docs | |
| workflow_dispatch: # Manual trigger | |
| permissions: read-all | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| # Prevent forks from deploying (no Cloudflare secrets) | |
| if: github.repository == 'nullvariant/nullvariant-vscode-extensions' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: '20' | |
| - name: Install wrangler | |
| run: npm install -g wrangler@4.54.0 | |
| - name: Deploy documentation to R2 | |
| run: | | |
| R2_BASE="nullvariant-assets/nullvariant-vscode-extensions" | |
| EXT_PATH="extensions/git-id-switcher" | |
| # === Monorepo root files === | |
| echo "=== Deploying monorepo root files ===" | |
| if [ -f "README.md" ]; then | |
| echo "Deploying monorepo README.md..." | |
| wrangler r2 object put "${R2_BASE}/README.md" \ | |
| --file "README.md" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| fi | |
| if [ -f "CONTRIBUTING.md" ]; then | |
| echo "Deploying monorepo CONTRIBUTING.md..." | |
| wrangler r2 object put "${R2_BASE}/CONTRIBUTING.md" \ | |
| --file "CONTRIBUTING.md" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| fi | |
| if [ -f "LICENSE" ]; then | |
| echo "Deploying monorepo LICENSE..." | |
| wrangler r2 object put "${R2_BASE}/LICENSE" \ | |
| --file "LICENSE" \ | |
| --content-type "text/plain; charset=utf-8" \ | |
| --remote | |
| fi | |
| # === Extension root files === | |
| echo "=== Deploying extension root files ===" | |
| # English README (extension root) | |
| echo "Deploying extension README.md (English)..." | |
| wrangler r2 object put "${R2_BASE}/${EXT_PATH}/README.md" \ | |
| --file "${EXT_PATH}/README.md" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| if [ -f "${EXT_PATH}/LICENSE" ]; then | |
| echo "Deploying extension LICENSE..." | |
| wrangler r2 object put "${R2_BASE}/${EXT_PATH}/LICENSE" \ | |
| --file "${EXT_PATH}/LICENSE" \ | |
| --content-type "text/plain; charset=utf-8" \ | |
| --remote | |
| fi | |
| if [ -f "${EXT_PATH}/CHANGELOG.md" ]; then | |
| echo "Deploying extension CHANGELOG.md..." | |
| wrangler r2 object put "${R2_BASE}/${EXT_PATH}/CHANGELOG.md" \ | |
| --file "${EXT_PATH}/CHANGELOG.md" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| fi | |
| # === Extension docs files === | |
| echo "=== Deploying extension docs files ===" | |
| # Deploy all .md files in docs/ (CONTRIBUTING.md, LANGUAGES.md, etc.) | |
| for doc_file in ${EXT_PATH}/docs/*.md; do | |
| if [ -f "$doc_file" ]; then | |
| filename=$(basename "$doc_file") | |
| echo "Deploying docs/${filename}..." | |
| wrangler r2 object put "${R2_BASE}/${EXT_PATH}/docs/${filename}" \ | |
| --file "$doc_file" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| fi | |
| done | |
| # === Language-specific READMEs === | |
| echo "=== Deploying language-specific READMEs ===" | |
| for lang_dir in ${EXT_PATH}/docs/i18n/*/; do | |
| lang=$(basename "$lang_dir") | |
| echo "Deploying ${lang}/README.md..." | |
| wrangler r2 object put "${R2_BASE}/${EXT_PATH}/docs/i18n/${lang}/README.md" \ | |
| --file "${lang_dir}README.md" \ | |
| --content-type "text/markdown; charset=utf-8" \ | |
| --remote | |
| done | |
| echo "=== Documentation deployed successfully! ===" | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |