Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate core publication to IG publisher #640

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/publish-docs.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/validate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Validate docs

on:
push:
branches: [ master ]
pull_request:
types: [opened, synchronize] # This will trigger the workflow only when a PR is opened or updated with new commits

jobs:
sushi:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Sushi
run: sudo npm install -g fsh-sushi

- name: Validate with Sushi
run: sushi .

ig-publisher:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install Jekyll
run: sudo gem install jekyll

- name: Install Sushi
run: sudo npm install -g fsh-sushi

- name: Install IG publisher
run: |
chmod +x ./_updatePublisher.sh
./_updatePublisher.sh -y

- name: Validate IG
run: |
chmod +x ./_genonce.sh
./_genonce.sh
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ env/

# mkdocs
site/

# IG publisher
.DS_Store
Thumbs.db
/fsh-generated
/input-cache
/output
/temp
/template
16 changes: 16 additions & 0 deletions OTHER-cds-hooks.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<specification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ciUrl="" defaultVersion="current" defaultWorkgroup="cds" url="https://cds-hooks.hl7.org">
<version code="current" url=""/>
<artifactPageExtension value="-definitions"/>
<artifactPageExtension value="-examples"/>
<artifactPageExtension value="-mappings"/>
<page key="NA" name="(NA)"/>
<page key="many" name="(many)"/>
<page key="artifacts" name="Artifacts Summary"/>
<page key="extensions-datatypes" name="Extensions Datatypes"/>
<page key="index" name="Home"/>
<page key="hooks" name="Hooks"/>
<page key="security" name="Security"/>
<page key="services" name="Services"/>
<page key="toc" name="Table of Contents"/>
</specification>
63 changes: 2 additions & 61 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,2 @@
<p align="center">
<img src="https://github.com/cds-hooks/docs/raw/master/logo.png">
</p>

# CDS Hooks

[![Build Status](https://api.travis-ci.org/cds-hooks/docs.svg)](https://travis-ci.org/cds-hooks/docs)

CDS Hooks is a vendor agnostic remote decision support standard. This repository serves as both the specification and website for the CDS Hooks project.

## Getting Started

This repository is built using the [MkDocs](http://www.mkdocs.org/) static site generator. In order to run the site locally or build this project, you will need to [install Python 2.7.13+](http://docs.python-guide.org/en/latest/starting/installation/).

1. Clone the repository

```sh
$ git clone https://github.com/cds-hooks/docs
```

2. Install the project dependencies

```sh
$ cd docs
$ pip install -r requirements.txt
```

3. Run the site locally

```sh
$ mkdocs serve
```

4. Using a browser, go to `http://127.0.0.1:8000/`

Anytime you make a change to the content within the site, your browser should automatically refresh to show your changes in real-time.

## Contributing

We encourage and welcome any contributions to CDS Hooks.

If you want to report an issue or enhancement, please make sure to browse our [existing issues](https://github.com/cds-hooks/docs/issues) before logging new issues.

In support of a healthy and inclusive community, we use and enforce a [code of conduct](./CODE_OF_CONDUCT.md) for all members of our community. Our code of conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org/).

## License

All Markdown content in this repository is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/).

Unless otherwise noted, the contents of this repository
are licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# cds-hooks
CDS Hooks specification and associated hook library
2 changes: 2 additions & 0 deletions _gencontinuous.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@ECHO OFF
CALL ./_genonce.bat -watch
2 changes: 2 additions & 0 deletions _gencontinuous.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
./_genonce.sh -watch
27 changes: 27 additions & 0 deletions _genonce.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@ECHO OFF
SET publisher_jar=publisher.jar
SET input_cache_path=%CD%\input-cache

ECHO Checking internet connection...
PING tx.fhir.org -4 -n 1 -w 1000 | FINDSTR TTL && GOTO isonline
ECHO We're offline...
SET txoption=-tx n/a
GOTO igpublish

:isonline
ECHO We're online
SET txoption=

:igpublish

SET JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF-8

IF EXIST "%input_cache_path%\%publisher_jar%" (
JAVA -jar "%input_cache_path%\%publisher_jar%" -ig . %txoption% %*
) ELSE If exist "..\%publisher_jar%" (
JAVA -jar "..\%publisher_jar%" -ig . %txoption% %*
) ELSE (
ECHO IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
)

PAUSE
30 changes: 30 additions & 0 deletions _genonce.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
publisher_jar=publisher.jar
input_cache_path=./input-cache/
echo Checking internet connection...
curl -sSf tx.fhir.org > /dev/null

if [ $? -eq 0 ]; then
echo "Online"
txoption=""
else
echo "Offline"
txoption="-tx n/a"
fi

echo "$txoption"

export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS -Dfile.encoding=UTF-8"

publisher=$input_cache_path/$publisher_jar
if test -f "$publisher"; then
java -jar $publisher -ig . $txoption $*

else
publisher=../$publisher_jar
if test -f "$publisher"; then
java -jar $publisher -ig . $txoption $*
else
echo IG Publisher NOT FOUND in input-cache or parent folder. Please run _updatePublisher. Aborting...
fi
fi
Loading