-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Muazzam chaud/issue278 setup GitHub repo to host static docs (#291)
- Loading branch information
1 parent
17dce78
commit bbbfed0
Showing
3 changed files
with
57 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ pipeline { | |
stash name: 'wheels', includes: '**/dist/*.whl' | ||
} | ||
} | ||
stage('Documentation') { | ||
stage('Building Documentation') { | ||
steps { | ||
script { | ||
dir('csvcubed-devtools') { | ||
|
@@ -132,19 +132,62 @@ pipeline { | |
sh 'poetry run sphinx-build -W -b html docs docs/_build/html' | ||
} | ||
|
||
dir('external-docs'){ | ||
sh "python3 -m mkdocs build" | ||
} | ||
|
||
stash name: 'docs', includes: '**/docs/_build/html/**/*' | ||
stash name: 'mkdocs', includes: '**/external-docs/site/**/*' | ||
} | ||
} | ||
} | ||
stage('Build Static Site'){ | ||
stage('Publishing Documentation'){ | ||
when{ | ||
branch 'main' | ||
} | ||
steps{ | ||
script{ | ||
dir('external-docs'){ | ||
sh "python3 -m mkdocs build" | ||
try { | ||
withCredentials([gitUsernamePassword(credentialsId: 'csvcubed-github', gitToolName: 'git-tool')]){ | ||
sh 'git clone "https://github.com/GSS-Cogs/csvcubed-docs.git"' | ||
dir ('csvcubed-docs') { | ||
sh 'git config --global user.email "[email protected]" && git config --global user.name "csvcubed"' | ||
|
||
if (fileExists("external")) { | ||
sh 'git rm -rf external' | ||
} | ||
sh 'mkdir external' | ||
sh 'cp -r ../external-docs/site/* external' | ||
|
||
if (fileExists("api-docs")) { | ||
sh 'git rm -rf api-docs' | ||
} | ||
sh 'mkdir api-docs' | ||
sh 'mkdir api-docs/csvcubed' | ||
sh 'mkdir api-docs/csvcubed-devtools' | ||
sh 'mkdir api-docs/csvcubed-models' | ||
sh 'mkdir api-docs/csvcubed-pmd' | ||
|
||
sh 'cp -r ../csvcubed/docs/_build/html/* api-docs/csvcubed' | ||
sh 'cp -r ../csvcubed-devtools/docs/_build/html/* api-docs/csvcubed-devtools' | ||
sh 'cp -r ../csvcubed-models/docs/_build/html/* api-docs/csvcubed-models' | ||
sh 'cp -r ../csvcubed-pmd/docs/_build/html/* api-docs/csvcubed-pmd' | ||
|
||
sh 'touch .nojekyll' | ||
|
||
sh 'git add *' | ||
sh 'git add .nojekyll' | ||
sh 'git commit -m "Updating documentation."' | ||
// commit being built in csvcubed repo: https://github.com/GSS-Cogs/csvcubed | ||
sh 'git checkout gh-pages' | ||
sh 'git reset --hard main' | ||
sh 'git push -f' | ||
} | ||
} | ||
} finally { | ||
sh 'rm -rf csvcubed-docs' | ||
} | ||
stash name: 'mkdocs', includes: '**/external-docs/site/**/*' | ||
} | ||
|
||
} | ||
} | ||
} | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
# Welcome to MkDocs | ||
|
||
For full documentation visit [mkdocs.org](https://www.mkdocs.org). | ||
## The Project | ||
### What the Project is about | ||
|
||
## Commands | ||
The csvcubed project aims to provide libraries and utilities which make it simple to turn a CSV into [5* linked data](https://5stardata.info/en/). We want to make it easier for data producers to annotate their existing data with the metadata required to ensure that each dataset is discoverable, comparable and analysable by automated tools. | ||
|
||
* `mkdocs new [dir-name]` - Create a new project. | ||
* `mkdocs serve` - Start the live-reloading docs server. | ||
* `mkdocs build` - Build the documentation site. | ||
* `mkdocs -h` - Print help message and exit. | ||
The csvcubed catalogue of tools help to deliver this vision in an opinionated fashion. Our tools output [data cubes](https://en.wikipedia.org/wiki/Data_cube) using the [CSV on the web (CSV-W)](https://www.w3.org/TR/tabular-metadata/) file format. Within these CSV-W files we describe what the data represents using a combination of the following ontologies: | ||
|
||
## Project layout | ||
|
||
mkdocs.yml # The configuration file. | ||
docs/ | ||
index.md # The documentation homepage. | ||
... # Other markdown pages, images and other files. | ||
- [RDF Data Cube (qb)](https://www.w3.org/TR/vocab-data-cube/) | ||
- [Simple Knowledge Organization System (SKOS)](http://www.w3.org/TR/skos-primer) | ||
- [Data Catalog Vocabulary (DCAT2)](https://www.w3.org/TR/vocab-dcat-2/) |
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