Update Content #24
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to deploy with IG Publisher and Shorthand to the hl7austria.github.io repository | |
name: PublishIG | |
# Run on updates to the master | |
on: | |
push: | |
branches: [ main, fokuswoche ] | |
pull_request: | |
branches: [ main, fokuswoche ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the implementation guide | |
uses: actions/checkout@v2 | |
with: | |
repository: HL7Austria/ELGA-IV-Herzinsuffizienz-R4 | |
path: . | |
- name: Extract branch name | |
run: | | |
if ["${{ github.event.pull_request.head.ref }}" == ""]; then | |
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
else | |
echo "##[set-output name=branch;]$(echo ${{ github.event.pull_request.head.ref }})" | |
fi | |
id: extract_branch | |
- name: Extract last commit date | |
shell: bash | |
run: echo "##[set-output name=date;]$(git log -1 --format="%at" | xargs -I{} date -d @{} +%d.%m.%Y)" | |
id: extract_date | |
- uses: bluwy/substitute-string-action@v1 | |
id: substitute_index | |
with: | |
_input-file: input/landing_page/_index.yml | |
_format-key: '%%key%%' | |
branch: ${{ steps.extract_branch.outputs.branch }} | |
date: ${{ steps.extract_date.outputs.date }} | |
_output-file: input/landing_page/_index.yml | |
- name: Install NPM | |
uses: actions/setup-node@v2.1.2 | |
with: | |
check-latest: true | |
- name: Install Sushi | |
run: sudo npm install -g fsh-sushi | |
- name: Install Jekyll | |
run: | | |
sudo apt-get install jekyll | |
- name: Download IG Publisher | |
uses: Legion2/download-release-action@v2.1.0 | |
with: | |
repository: HL7/fhir-ig-publisher | |
tag: 'latest' | |
path: . | |
file: publisher.jar | |
- name: Run IG Publisher | |
run: | | |
mkdir input-cache | |
mv publisher.jar ./input-cache/publisher.jar | |
unset DISPLAY | |
java -Djava.awt.headless=true -jar ./input-cache/publisher.jar -ig ig.ini | |
- name: Move index file | |
run: | | |
mv ./input/landing_page/_index.yml ./output/ | |
- name: Deploy Implementation Guide | |
if: success() | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.ROBO_OLIVER }} | |
external_repository: HL7Austria/hl7austria.github.io | |
publish_branch: pages | |
publish_dir: ./output | |
destination_dir: ./r4-ELGA-IV-Herzinsuffizienz-${{ steps.extract_branch.outputs.branch }} |