Skip to content

Commit

Permalink
updated deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
alexhang212 committed Aug 10, 2024
1 parent b84d5c2 commit 1826255
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 19 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,22 @@ on:
- gh-pages

jobs:
build:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install Sphinx & Dependencies
run: pip install sphinx sphinx_markdown_builder sphinx_rtd_theme
- name: Build Documentation
run: cd "$GITHUB_WORKSPACE/" && make html

- uses: actions/upload-artifact@v3
with:
name: Documentation
path: "$GITHUB_WORKSPACE/build/html"
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Sphinx build
run: |
sphinx-build doc _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
26 changes: 26 additions & 0 deletions deploy copy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy Sphinx Docs to GitHub Pages

on:
push:
branches:
- gh-pages

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'

- name: Install Sphinx & Dependencies
run: pip install sphinx sphinx_markdown_builder sphinx_rtd_theme
- name: Build Documentation
run: cd "$GITHUB_WORKSPACE/" && make html

- uses: actions/upload-artifact@v3
with:
name: Documentation
path: "$GITHUB_WORKSPACE/build/html"
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

0 comments on commit 1826255

Please sign in to comment.