Skip to content

Commit

Permalink
Migrate deployment of documentation tables to GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrossberndt committed Dec 14, 2022
1 parent 8660907 commit 66cf2f4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy documentation tables

on:
push:
branches: ["changes_for_v1.1"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './docs/generated'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ at [CEN](https://www.cen.eu).

## Repository

Download the XSD schema files and examples in the git repository found at https://github.com/VDVde/OJP and take a look at the [documentation tables](https://vdvde.github.io/OJP/generated/OJP.html).
Download the XSD schema files and examples in the git repository found at https://github.com/VDVde/OJP and take a look at the [documentation tables](https://vdvde.github.io/OJP/index.html).


## Regulatory environment of OJP
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ For Windows, you'll find Windows binaries for xsltproc at http://xmlsoft.org/XSL

### Instructions

On Linux and with the above prerequisites at hand, you can run `generate-tables.sh` to convert the XML schemas into a single HTML file [`OJP.html`](generated/OJP.html) in the `generated` subdirectory.
On Linux and with the above prerequisites at hand, you can run `generate-tables.sh` to convert the XML schemas into a single HTML file [`index.html`](generated/index.html) in the `generated` subdirectory.

The generated HTML file requires the file `asciidoc.css` to be in the same directory. The above script makes sure it's there.

Expand All @@ -28,7 +28,7 @@ On Windows, please refer to the `generate-tables.sh` to figure out the necessary

`generate-tables.sh` runs `xsltproc` twice. First the file `schema-collection.xml` is run against `ojp-to-prepdoc.xsl`. This combines all references XSD files to a single intermediate XML files which maps all information into a simplified structure that will make it easier in the second step to generate the final HTML documentation.

Once, you have the intermediate XML file (`generated/OJP-prep.xml`), you can run that against the `ojp-prep-to-html-with-toc.xsl` stylesheet. This will generate the final `OJP.html` (HTML with table of contents). Alternatively, if you don't want the table of contents, you can use the stylesheet `ojp-prep-to-html.xsl`.
Once, you have the intermediate XML file (`generated/OJP-prep.xml`), you can run that against the `ojp-prep-to-html-with-toc.xsl` stylesheet. This will generate the final `index.html` (HTML with table of contents). Alternatively, if you don't want the table of contents, you can use the stylesheet `ojp-prep-to-html.xsl`.

## XML Schema Convention Check

Expand Down
2 changes: 1 addition & 1 deletion docs/generate-tables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ xsltproc --xinclude "${xsl_dir}"/ojp-to-prepdoc.xsl \
# generate stand-alone HTML file for documentation
xsltproc --xinclude "${xsl_dir}"/ojp-prep-to-html-with-toc.xsl \
"${generated_dir}"/OJP-prep.xml \
>> "${generated_dir}"/OJP.html
>> "${generated_dir}"/index.html

echo -e '\033[0;32mFinished generating documentation tables\033[0m'
File renamed without changes.

0 comments on commit 66cf2f4

Please sign in to comment.