Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

other(workflow): Sphinx Docs Workflow #11

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
name: convert

on:
push:

jobs:
converttopdf:
name: Build PDF
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build book
run: |-
npm install -g md-to-pdf
mkdir -p _output
cd docs
echo; echo "Input Folder Listing"
ls
echo; echo "Generating PDF"
for f in *.md; do cat $f; echo; done | md-to-pdf --stylesheet "../theme/style.css" > ../_output/blue-paper.pdf
cd ../_output
echo; echo "Output Folder Listing"
ls
cd ..

- uses: actions/upload-artifact@v1
with:
name: output
path: _output
#name: convert
#
#on:
# push:
#
#jobs:
# converttopdf:
# name: Build PDF
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
#
# - name: Build book
# run: |-
# npm install -g md-to-pdf
# mkdir -p _output
# cd docs
# echo; echo "Input Folder Listing"
# ls
# echo; echo "Generating PDF"
# for f in *.md; do cat $f; echo; done | md-to-pdf --stylesheet "../theme/style.css" > ../_output/blue-paper.pdf
# cd ../_output
# echo; echo "Output Folder Listing"
# ls
# cd ..
#
# - uses: actions/upload-artifact@v1
# with:
# name: output
# path: _output
27 changes: 27 additions & 0 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: documentation

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- 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: main
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true