diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 000000000..a432ce717 --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -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 diff --git a/README.md b/README.md index 6cf308dca..ad5c22ced 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/README.md b/docs/README.md index 1b68a9f75..efa8b07a1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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. @@ -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 diff --git a/docs/generate-tables.sh b/docs/generate-tables.sh index cdf5f3e1c..3216c536e 100755 --- a/docs/generate-tables.sh +++ b/docs/generate-tables.sh @@ -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' diff --git a/docs/generated/OJP.html b/docs/generated/index.html similarity index 100% rename from docs/generated/OJP.html rename to docs/generated/index.html