Skip to content

Commit

Permalink
Merge pull request #11 from AdyGCode/dev
Browse files Browse the repository at this point in the history
other(workflow): Sphinx Docs Workflow
  • Loading branch information
AdyGCode authored Mar 15, 2024
2 parents a3693aa + dd79f46 commit 33c9c1e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 30 deletions.
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

0 comments on commit 33c9c1e

Please sign in to comment.