Skip to content

doc: add support for pdf generation (#42) #75

doc: add support for pdf generation (#42)

doc: add support for pdf generation (#42) #75

Workflow file for this run

name: Deploy MkDocs
on:
push:
branches:
- main
pull_request:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y fonts-noto
python3 -m pip install --upgrade pip
# https://github.com/comwes/mkpdfs-mkdocs-plugin/issues/59
# https://github.com/Kozea/WeasyPrint/issues/2202
pip3 install mkdocs mkdocs-material pymdown-extensions twine pydyf==0.10.0 mkpdfs2-mkdocs
- name: Prepare docs
run: |
bash .github/prepare_doc.sh
#git clone https://github.com/comwes/mkpdfs-design-sample design
#sudo apt install sass npm
#pushd design
#npm install
#npm run build
#popd
#cp design/report.css docs/
- name: Build MkDocs
run: mkdocs build
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
with:
branch: gh-pages
folder: ./site
- name: Deploy Documentation
if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
env:
FTPUSER: ${{ secrets.FTPUSER }}
FTPPWD: ${{ secrets.FTPPWD }}
FTPSERVER: ${{ secrets.FTPSERVER }}
run: |
bash .github/ftp_deploy.sh $FTPUSER $FTPPWD $FTPSERVER site nuclei_studio_supply
echo "Click https://doc.nucleisys.com/nuclei_studio_supply to view the latest deployment!"
- name: Upload Documentation
uses: actions/upload-artifact@v4
with:
# Artifact name
name: nuclei_studio_supply
# A file, directory or wildcard pattern that describes what to upload
path: ./site