Skip to content
This repository was archived by the owner on Aug 11, 2026. It is now read-only.

Deploy to GitHub Pages #1

Deploy to GitHub Pages

Deploy to GitHub Pages #1

# Publishes the archived polaris.shopify.com docs to GitHub Pages at
# https://shopify.github.io/polaris-react/.
#
# Deliberately `workflow_dispatch` only: this is meant to be run once, by hand,
# before the repository is re-archived. GitHub Pages keeps serving the deployed
# artifact after archival, but no workflow can run again at that point, so
# there is nothing to gain from an automatic trigger.
name: Deploy to GitHub Pages
on:
workflow_dispatch:
# Only one deployment at a time; don't cancel one that's already publishing.
concurrency:
group: pages
cancel-in-progress: false
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
name: Build static export
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- name: Setup pnpm
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version: '20.10.0'
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Configure Pages
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
with:
# Turn Pages on (source: GitHub Actions) rather than assuming someone
# already did it in Settings. Without this the step fails with "Get
# Pages site failed" if it hasn't been enabled, and this workflow only
# gets the one run before the repo goes back to being archived.
enablement: true
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: polaris.shopify.com/out
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0