Skip to content

Repo sync

Repo sync #318

Workflow file for this run

name: Documentation
on:
# Deploy when docs or the website change on main.
push:
branches: [main]
paths:
- 'cinderx/website/**'
# Build-only check on PRs that touch docs.
pull_request:
paths:
- 'cinderx/website/**'
# Allow manual runs.
workflow_dispatch:
# Allow the deploy job to publish to GitHub Pages via OIDC.
permissions:
contents: read
pages: write
id-token: write
# Only one concurrent deploy; don't cancel an in-progress production deploy.
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
if: github.repository == 'facebookincubator/cinderx'
name: Build site
runs-on: ubuntu-latest
defaults:
run:
working-directory: cinderx/website
steps:
- name: Checkout CinderX
uses: actions/checkout@v6
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
cache-dependency-path: cinderx/website/yarn.lock
- name: Install dependencies
run: yarn install
- name: Build (fails on broken links)
run: yarn build
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: cinderx/website/build
deploy:
# Only deploy from main; PRs run the build job above as a check.
if: github.repository == 'facebookincubator/cinderx' && github.event_name != 'pull_request'
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v4