fix(website): keep hero terminal in viewport on mobile, stop page scr… #27
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
| # Deploy docs to GitHub Pages (hivemind.rithul.dev) | |
| # - On push to main: build Docusaurus and deploy to gh-pages | |
| # - On release published: open a PR with versioned docs (merge it to update main; workflow never pushes to main = no diverging branch). | |
| # | |
| # Required: Repo Settings → Pages → Build and deployment → Source: | |
| # "Deploy from a branch" → Branch: gh-pages → / (root) | |
| name: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - ".github/workflows/docs.yml" | |
| - "website/**" | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: docs | |
| cancel-in-progress: false | |
| jobs: | |
| add-version: | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout main | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: website/package-lock.json | |
| - name: Parse version from tag | |
| id: version | |
| run: | | |
| V="${GITHUB_REF#refs/tags/v}" | |
| echo "version=$V" >> $GITHUB_OUTPUT | |
| - name: Install and add docs version | |
| run: | | |
| cd website | |
| npm ci | |
| npx docusaurus docs:version ${{ steps.version.outputs.version }} | |
| - name: Open PR for versioned docs (no push to main) | |
| uses: peter-evans/create-pull-request@v7 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: "docs/version-${{ steps.version.outputs.version }}" | |
| base: main | |
| title: "chore(docs): add version ${{ steps.version.outputs.version }}" | |
| body: | | |
| Versioned docs for **v${{ steps.version.outputs.version }}**. Merge to update the docs site. | |
| This workflow never pushes to main, so your branch will not diverge. | |
| commit-message: "chore(docs): add version ${{ steps.version.outputs.version }}" | |
| add-paths: | | |
| website/versioned_docs | |
| website/versioned_sidebars | |
| website/versions.json | |
| delete-branch: true | |
| deploy: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| cache: "npm" | |
| cache-dependency-path: website/package-lock.json | |
| - name: Install and build | |
| run: | | |
| cd website | |
| npm ci | |
| npm run build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: website/build | |
| cname: hivemind.rithul.dev |