Skip to content

chore: trigger GitHub contributors refresh #7

chore: trigger GitHub contributors refresh

chore: trigger GitHub contributors refresh #7

Workflow file for this run

name: Documentation Deploy
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: write # Required for gh-pages deployment
jobs:
build-and-deploy:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
steps:
# 1. Checkout code
- name: Checkout code
uses: actions/checkout@v4
# 2. Setup Node.js
- name: Setup Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
# 3. Install dependencies
- name: Install dependencies
run: npm ci
# 4. SDK validation (MUST pass before deployment)
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run type-check
- name: Run tests (BLOCKING)
run: npm test
- name: Build SDK
run: npm run build
- name: Validate build artifacts
run: |
test -d dist || exit 1
test -f dist/esm/index.js || exit 1
test -f dist/cjs/index.js || exit 1
test -f dist/esm/index.d.ts || exit 1
echo "βœ“ Build artifacts validated successfully"
# 5. Documentation build
- name: Generate TypeDoc API reference
run: npm run docs:api
- name: Build VitePress documentation
env:
NODE_ENV: production
run: npm run docs:build
- name: Validate documentation output
run: |
test -d docs/.vitepress/dist || exit 1
test -f docs/.vitepress/dist/index.html || exit 1
echo "βœ“ Documentation build validated successfully"
# 6. Validation
- name: Validate documentation links
run: npm run validate:links
# 7. Extract version for commit message
- name: Extract SDK version
id: version
run: echo "SDK_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV
# 8. Deploy (main branch only)
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/.vitepress/dist
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
commit_message: 'docs: deploy v${{ env.SDK_VERSION }} - ${{ github.sha }}'
enable_jekyll: false
# 9. Deployment status
- name: Deployment complete
if: github.ref == 'refs/heads/main'
run: |
echo "βœ“ Documentation deployed successfully!"
echo "πŸ“š Visit: https://salacoste.github.io/daytona-wildberries-typescript-sdk/"
echo "πŸ“¦ Version: v${{ env.SDK_VERSION }}"
echo "πŸ”— Commit: ${{ github.sha }}"