[broken — no dist] @stainless-code/layers@0.2.1 #21
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: Deploy docs | |
| # Unversioned /layers FTP. `docs` label = deploy on merge without waiting for a package release. | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| pull_request: | |
| types: [closed] | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| # Single FTP root — don't overlap uploads. | |
| concurrency: | |
| group: deploy-docs-production | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: 🚀 Build & Deploy docs (FTP) | |
| if: > | |
| github.event_name == 'workflow_dispatch' || | |
| github.event_name == 'release' || | |
| (github.event_name == 'pull_request' && | |
| github.event.pull_request.merged == true && | |
| contains(github.event.pull_request.labels.*.name, 'docs')) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7 | |
| with: | |
| persist-credentials: false | |
| # Closed PR checkout defaults to a dead merge ref — pin the merge commit on main. | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.merge_commit_sha || github.sha }} | |
| # Sitemap lastmod uses `git log` per file. | |
| fetch-depth: 0 | |
| - name: Setup Bun | |
| uses: ./.github/actions/setup | |
| # Islands resolve workspace package `dist/` — same order as CI docs job. | |
| - name: Build packages | |
| run: bun run build | |
| - name: Generate API reference (Markdown) | |
| run: bun run docs:api | |
| - name: Build docs site | |
| env: | |
| # Changelog github-releases source + avoid unauthenticated API rate limits. | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: bun run docs:build | |
| # FTP account root is already /layers — server-dir ./ is correct (not ./layers/). | |
| - name: Upload to /layers via FTP | |
| uses: SamKirkland/FTP-Deploy-Action@v4.4.0 | |
| with: | |
| server: ${{ secrets.FTP_HOST }} | |
| username: ${{ secrets.FTP_USERNAME }} | |
| password: ${{ secrets.FTP_PASSWORD }} | |
| protocol: ftps | |
| port: 21 | |
| security: strict | |
| local-dir: ./apps/docs/dist/ | |
| server-dir: ./ | |
| exclude: | | |
| **/.git* | |
| **/.git*/** | |
| **/node_modules/** |