From 8e0d027f693d3fcf751d2b0fdbe8ec3c9cdb3908 Mon Sep 17 00:00:00 2001 From: Hao-Ting Wang Date: Fri, 28 Feb 2025 14:08:22 -0500 Subject: [PATCH 1/3] first attempt --- .github/workflows/deploy_docs.yml | 52 +++++++++++++++++++++++++++++++ docs/.nojekyll | 0 docs/index.html | 1 - docs/source/conf.py | 2 +- docs/source/index.rst | 2 +- docs/source/requirements.txt | 6 ++++ 6 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/deploy_docs.yml delete mode 100644 docs/.nojekyll delete mode 100644 docs/index.html create mode 100644 docs/source/requirements.txt diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml new file mode 100644 index 0000000..a760d11 --- /dev/null +++ b/.github/workflows/deploy_docs.yml @@ -0,0 +1,52 @@ +name: Deploy content to Pages + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + # 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup sphinx + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r docs/requirements.txt + - name: Build docs + run: | + cd docs + make html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docs/.nojekyll b/docs/.nojekyll deleted file mode 100644 index e69de29..0000000 diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 232e1b0..0000000 --- a/docs/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index e5b9077..8fd889f 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -23,5 +23,5 @@ # -- Options for HTML output ------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output -html_theme = 'alabaster' +html_theme = 'sphinx_book_theme' html_static_path = ['_static'] diff --git a/docs/source/index.rst b/docs/source/index.rst index 9e61313..1e36ffd 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -11,4 +11,4 @@ Giga Processing 2 documentation :caption: Contents: procedures - working-on-ac \ No newline at end of file + working-on-ac \ No newline at end of file diff --git a/docs/source/requirements.txt b/docs/source/requirements.txt new file mode 100644 index 0000000..ca89426 --- /dev/null +++ b/docs/source/requirements.txt @@ -0,0 +1,6 @@ +sphinx-book-theme +myst-parser +sphinx +jupytext +nbsphinx +sphinx-copybutton \ No newline at end of file From f4bda5c6a8e095d6c44cca7bec09d63c39895946 Mon Sep 17 00:00:00 2001 From: Hao-Ting Wang Date: Fri, 28 Feb 2025 14:08:36 -0500 Subject: [PATCH 2/3] first attempt of using ga for sphinx --- .github/workflows/deploy_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index a760d11..f3a7b98 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -46,7 +46,7 @@ jobs: uses: actions/upload-pages-artifact@v3 with: # Upload entire repository - path: '.' + path: 'docs/_build/html' - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 From 69d1554bc7c4042688e44a453c3729c889103096 Mon Sep 17 00:00:00 2001 From: Hao-Ting Wang Date: Fri, 28 Feb 2025 14:10:06 -0500 Subject: [PATCH 3/3] remove protection --- .github/workflows/deploy_docs.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index f3a7b98..01123fd 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -5,14 +5,6 @@ on: branches: ["main"] pull_request: branches: ["main"] - # 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 only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.