Skip to content

GitHub Actions Pipeline

Intent

Establish standard CI for GitHub-hosted IG repositories that builds, validates, and deploys on every push. Reviewers can see rendered output before merging, and releases are automated from tags.

Behavior

CI/CD Workflow

The GitHub Actions pipeline builds, validates, and deploys the IG on every PR and merge. Pull requests get preview deployments to branch-specific URLs, enabling reviewers to see the rendered IG rather than just source diffs. Merges to main trigger production deployment.

GitHub Actions CI/CD pipeline from PR to deployment

Implementation Considerations

Workflow

Workflow
name: IG Build
on:
  pull_request:
  push:
    branches: [ main ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: '20'
      - name: Setup Java
        uses: actions/setup-java@v4
        with:
          distribution: 'temurin'
          java-version: '17'
      - name: Cache IG Publisher
        uses: actions/cache@v4
        with:
          path: ~/.fhir/ig-publisher
          key: ${{ runner.os }}-igpub-1
      - name: Install SUSHI
        run: npm install -g fsh-sushi@3.9.0
      - name: Run SUSHI
        run: sushi .
      - name: Run IG Publisher
        run: ./_scripts/publisher.sh
      - name: Publish to gh-pages (preview)
        if: github.event_name == 'pull_request'
        uses: peaceiris/actions-gh-pages@v3
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./output
          destination_dir: branches/${{ github.head_ref }}

Pages

  • Publish preview to gh-pages; branch-based paths
  • Upload artifacts for download (packages, QA reports)

Benefits

  • Rapid reviews

Trade-offs

  • Pages permissions required