Skip to content

Commit

Permalink
Merge pull request #65 from alchem0x2A/master
Browse files Browse the repository at this point in the history
Initialize gh pages doc configuration
  • Loading branch information
alchem0x2A authored Nov 5, 2024
2 parents e256a58 + 7767d93 commit 7d1574f
Show file tree
Hide file tree
Showing 22 changed files with 1,043 additions and 519 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish_doc_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish Document Pages for SPARC-X-API

on:
push:
branches:
- master
- 'docs/**'
pull_request:
branches:
- master
paths:
- 'docs/**'

workflow_dispatch:

jobs:
sphinx-build:
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.11"
mamba-version: "*"
channels: conda-forge,defaults
channel-priority: true
activate-environment: sparc-api-build-doc
- name: Install doc-build dependencies
run: |
pip install -e ".[doc]"
- name: Build sphix doc
run: |
sphinx-build docs docs/_build
- name: Deploy to github pages
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh_pages
publish_dir: docs/_build
- name: Upload preview when creating pull request
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: docs_build_preview
path: docs/_build
Loading

0 comments on commit 7d1574f

Please sign in to comment.