-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #378 from ml-evs/develop
Adding an HTML build of the specification
- Loading branch information
Showing
3 changed files
with
602 additions
and
3 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 |
---|---|---|
@@ -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 }} |
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
Oops, something went wrong.