Repository navigation
chore(deps): bump astro from 7.2.2 to 7.2.10 in /docs-site (#39) #52
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 | |
| on: | |
| push: | |
| branches: [master] | |
| paths: | |
| - 'docs/**' | |
| - 'docs-site/**' | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| - 'docs-site/**' | |
| jobs: | |
| build-and-deploy: | |
| name: Build and deploy docs | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| permissions: | |
| contents: read | |
| deployments: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Migrate docs to Starlight content | |
| run: python3 docs-site/migrate.py | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: docs-site/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci --legacy-peer-deps | |
| working-directory: docs-site | |
| - name: Build | |
| run: npm run build | |
| working-directory: docs-site | |
| - name: Deploy to Cloudflare Pages | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' && env.CLOUDFLARE_API_TOKEN != '' && env.CLOUDFLARE_ACCOUNT_ID != '' | |
| uses: cloudflare/wrangler-action@v3 | |
| with: | |
| apiToken: ${{ env.CLOUDFLARE_API_TOKEN }} | |
| accountId: ${{ env.CLOUDFLARE_ACCOUNT_ID }} | |
| command: pages deploy docs-site/dist --project-name=mithai-docs --branch=${{ github.ref_name }} |