smriti/.github/workflows/pages.yml
Himanshu Dongre 5d00ba99f1 Add GitHub Pages deployment workflow for website/
The smallest correct path to publish the static landing page:

- `.github/workflows/pages.yml` uses the official actions/configure-pages
  + upload-pages-artifact + deploy-pages chain to upload ./website as
  the Pages site on every push to main that touches website/ or the
  workflow itself, plus a workflow_dispatch trigger for the first
  manual deploy.
- No content changes to the landing page, no framework, no build step —
  pure HTML + CSS uploaded as-is.
- Not chosen: moving website/ into docs/ to use the legacy "Deploy from
  a branch" path. docs/ already holds developer-facing API.md /
  DEMO_SCRIPT.md / assets; mixing those with the marketing landing page
  would conflate concerns and start exposing internal docs at the Pages
  URL.

One-time manual setup on GitHub (cannot be done from a workflow file):
  Settings -> Pages -> Build and deployment -> Source: GitHub Actions

After that, every push to main that touches website/ auto-publishes.
The first deploy can be triggered from the Actions tab via
workflow_dispatch. The site URL appears as the environment URL on the
workflow run and will default to https://<owner>.github.io/<repo>/.

Verified: YAML parses cleanly; the upload path ./website exists with
index.html; official action versions pinned (checkout@v4,
configure-pages@v5, upload-pages-artifact@v3, deploy-pages@v4).
2026-05-21 01:55:34 +05:30

56 lines
1.6 KiB
YAML

# Deploy the website/ landing page to GitHub Pages.
#
# One-time manual setup on GitHub (cannot be done from a workflow file):
# Settings -> Pages -> Build and deployment -> Source: GitHub Actions
#
# After that, every push to main that touches website/ (or this workflow
# itself) auto-publishes. The first deploy can also be kicked off
# manually from the Actions tab (the workflow_dispatch trigger below).
# The published URL appears as the environment URL on the workflow run
# and will be https://<owner>.github.io/<repo>/ by default.
name: Deploy website to GitHub Pages
on:
push:
branches: [main]
paths:
- 'website/**'
- '.github/workflows/pages.yml'
workflow_dispatch:
# Minimum permissions the official Pages actions need.
permissions:
contents: read
pages: write
id-token: write
# One concurrent deploy at a time. Finish in-progress runs rather than
# canceling them so a deploy already underway isn't truncated.
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Static landing page is self-contained under website/.
# No build step — pure HTML + CSS, no framework.
path: ./website
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4