Skip to content

Commit

Permalink
Merge pull request #378 from ml-evs/develop
Browse files Browse the repository at this point in the history
Adding an HTML build of the specification
  • Loading branch information
rartino authored Mar 19, 2024
2 parents b20d7f6 + 6466775 commit cd52697
Show file tree
Hide file tree
Showing 3 changed files with 602 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build GitHub pages

on:
push:
branches:
- develop

jobs:

build_html:
runs-on: ubuntu-latest

env:
COMMIT_AUTHOR: OPTIMADE developers
COMMIT_AUTHOR_EMAIL: [email protected]

steps:

- uses: actions/checkout@v2

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Install dependencies
run: pip install docutils

- name: Run rst2html
run: make html

- name: Configure git
run: |
git config --global user.name "${COMMIT_AUTHOR}"
git config --global user.email "${COMMIT_AUTHOR_EMAIL}"
- name: Commit to gh-pages
run: |
git branch -D gh-pages || true
git checkout -b gh-pages
git add optimade.html
git commit -m "Deploy to GitHub Pages: ${SHA}"
if git diff --cached --quiet; then
exit 0
fi
- name: Push changes
uses: ad-m/[email protected]
with:
branch: gh-pages
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 2 additions & 3 deletions tests/makefiles/Makelocal-output
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@ HTML_FILES = ${RST_FILES:%.rst=%.html}

html: ${HTML_FILES}

%.html: %.rst
rst2html --syntax-highlight=none $< $@

%.html: %.rst ./tests/makefiles/style.css
$(shell which rst2html5.py || which rst2html5 || echo "rst2html5.py") -d --syntax-highlight=none --stylesheet=$(word 2, $^) $< $@
Loading

0 comments on commit cd52697

Please sign in to comment.