| name: Build and Publish FHIR IG | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'input/**' | |
| - 'sushi-config.yaml' | |
| - 'ig.ini' | |
| - '.github/workflows/docs.yml' | |
| workflow_dispatch: | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install SUSHI | |
| run: npm install -g fsh-sushi | |
| - name: Run SUSHI Build | |
| run: sushi . | |
| - name: Install Ruby and Jekyll | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install ruby-full build-essential zlib1g-dev | |
| sudo gem install jekyll bundler | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Cache FHIR Packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.fhir/packages | |
| input-cache | |
| key: fhir-packages-${{ runner.os }} | |
| - name: Download IG Publisher | |
| run: | | |
| mkdir -p input-cache | |
| wget -q https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar -O input-cache/publisher.jar | |
| - name: Run IG Publisher | |
| run: | | |
| java -jar input-cache/publisher.jar -ig . | |
| cp package-list.json output/package-list.json | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./output | |
| cname: opennursingcoreig.com | |
| commit_message: "deploy: update fhir ig website [skip ci]" | |