chore: staging-QA polish bundle (docs overflow, reduced-motion, logo wall, showcase gradient, brand casing) #304
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: Node.js CI | |
| # Triggers: | |
| # - push to main → publish_stage publishes :stage (internal) | |
| # - push tag v* → release_package publishes :latest + :vX.Y.Z | |
| # - PR to main/development → build job only (no publish) | |
| # - workflow_dispatch → manual button to refresh :stage on demand | |
| # | |
| # Stage deploys (gofr-dev/gofr's website-stage.yml) pull :stage, so | |
| # every merge to website main automatically refreshes what stage shows. | |
| # Prod deploys (website-prod.yml) build inline from this source rather | |
| # than pulling :latest, so prod is always fresh on every framework | |
| # release tag regardless of when the website was last tagged. | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| - development | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js 18.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Build App | |
| run: | | |
| yarn install | |
| yarn build | |
| # Internal :stage artifact. Published on every push to main + via | |
| # workflow_dispatch. Each run refreshes data so :stage bakes in | |
| # current GoFr release / roadmap / contributor state. Stage deploys | |
| # in gofr-dev/gofr pull this image — pulling is cheaper than | |
| # rebuilding the website from source on every push to gofr's | |
| # development branch. | |
| publish_stage: | |
| if: | | |
| (github.event_name == 'push' && github.ref == 'refs/heads/main') || | |
| github.event_name == 'workflow_dispatch' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js 18.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Refresh data from GitHub (snapshot fallback on failure) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: yarn refresh-data | |
| continue-on-error: true | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push Docker image (:stage) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| push: true | |
| context: . | |
| file: Dockerfile | |
| tags: ghcr.io/gofr-dev/website:stage | |
| # Public :latest artifact. Published on tag v* push as a versioned | |
| # release + the rolling :latest pointer. Prod deploys do NOT pull | |
| # this — they build inline — but it's kept as an external artifact | |
| # and a rollback target. | |
| release_package: | |
| if: ${{ startsWith(github.ref, 'refs/tags/v')}} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| # Full history is needed by utils/generate-doc-mtimes.mjs which | |
| # reads `git log` per source file to compute the visible | |
| # "Last updated" byline. A shallow clone would give every doc | |
| # the same boot timestamp. | |
| with: | |
| fetch-depth: 0 | |
| - name: Use Node.js 18.x | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18.x | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| # Pull fresh data from GitHub at deploy time — releases, roadmap | |
| # milestones, team profiles + contributor list, and per-doc git | |
| # mtimes. The fetch scripts each have a snapshot fallback: on a | |
| # rate-limited or transient failure they keep the previously- | |
| # committed JSON rather than emitting an empty file. | |
| # | |
| # `continue-on-error: true` makes this step non-blocking — even | |
| # in the worst case (every API call failed) the build proceeds | |
| # with the committed snapshots, never an empty website. | |
| # | |
| # Auth uses the workflow's built-in GITHUB_TOKEN (1000 req/hr), | |
| # which is enough for our ~150-request refresh and avoids the | |
| # 60/hr unauthenticated cliff. | |
| - name: Refresh data from GitHub (snapshot fallback on failure) | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: yarn refresh-data | |
| continue-on-error: true | |
| - name: Log in to the Container registry | |
| uses: docker/login-action@v1 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Release Tag | |
| run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
| - name: Build and push Docker image (:latest + :v*) | |
| uses: docker/build-push-action@v4 | |
| with: | |
| push: true | |
| context: . | |
| file: Dockerfile | |
| tags: ghcr.io/gofr-dev/website:${{ env.RELEASE_VERSION }},ghcr.io/gofr-dev/website:latest |