This repository was archived by the owner on Apr 28, 2026. It is now read-only.
still trying to resolve vercel build error #3
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] | |
| workflow_dispatch: # Allow manual deployment | |
| jobs: | |
| deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs | |
| uses: actions/checkout@v4 | |
| - name: Checkout corpus (for schema and contracts) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: behavioral-contracts/corpus | |
| path: ../corpus | |
| - name: Checkout verify-cli (for help output) | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: behavioral-contracts/verify-cli | |
| path: ../verify-cli | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '18' | |
| cache: 'npm' | |
| - name: Install docs dependencies | |
| run: npm ci | |
| - name: Install verify-cli dependencies and build | |
| run: | | |
| cd ../verify-cli | |
| npm ci | |
| npm run build | |
| - name: Regenerate all auto-generated docs | |
| run: npm run docs:generate | |
| - name: Validate all examples | |
| run: npm run validate | |
| - name: Build documentation site | |
| run: npm run build | |
| env: | |
| NODE_ENV: production | |
| - name: Deploy to Vercel | |
| uses: amondnet/vercel-action@v25 | |
| with: | |
| vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
| vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | |
| vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} | |
| vercel-args: '--prod' | |
| working-directory: ./ | |
| # Alternative: Deploy to GitHub Pages | |
| # - name: Deploy to GitHub Pages | |
| # uses: peaceiris/actions-gh-pages@v3 | |
| # with: | |
| # github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # publish_dir: ./build | |
| # cname: docs.behavioral-contracts.org | |
| # Alternative: Deploy to Netlify | |
| # - name: Deploy to Netlify | |
| # uses: nwtgck/actions-netlify@v2.0 | |
| # with: | |
| # publish-dir: './build' | |
| # production-branch: main | |
| # github-token: ${{ secrets.GITHUB_TOKEN }} | |
| # deploy-message: "Deploy from GitHub Actions" | |
| # env: | |
| # NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
| # NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
| - name: Comment on PR (if applicable) | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v6 | |
| with: | |
| script: | | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: '✅ Documentation deployed successfully!\n\nPreview: https://behavioral-contracts.org' | |
| }) |