Skip to content

Convert jingkaimori doc to html for CICD #21

Convert jingkaimori doc to html for CICD

Convert jingkaimori doc to html for CICD #21

name: CI/CD for Converting tm format to html
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
XMAKE_ROOT: y
QT_QPA_PLATFORM: offscreen
INSTALL_DIR: tmp/build/packages/app.mogan/
jobs:
build:
container: debian:bookworm
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
DEBIAN_FRONTEND=noninteractive apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y gcc git 7zip unzip curl build-essential \
fonts-noto-cjk libcurl4-openssl-dev libfreetype-dev libfontconfig-dev \
${{matrix.qt_pkg}} libgit2-dev zlib1g-dev libssl-dev libjpeg62-turbo-dev cmake \
libmimalloc-dev
apt-get update && apt-get install -y wget
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: git add safe directory
run: git config --global --add safe.directory '*'
- name: download release from mogan research repository
run: |
wget https://github.com/XmacsLabs/mogan/releases/download/v1.2.7/mogan-research-v1.2.7-debian12.deb -O /tmp/mogan-research-v1.2.7-debian12.deb
DEBIAN_FRONTEND=noninteractive apt install -y /tmp/mogan-research-v1.2.7-debian12.deb
- name: List installed files
run: dpkg -L mogan-research
- name: List root directory for debugging
run: |
ls -al
cd /usr/bin
ls -al
- name: convert document to html format
run: |
/usr/bin/MoganResearch -headless -b CICD/tm2html_CICD.scm -x "(tm2html_CICD)" -q
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
ref: gh-pages
persist-credentials: false # This ensures the credentials are not persisted to the subsequent steps
path: gh-pages # This checks out the gh-pages branch into a separate directory
- name: Copy output files
run:
cp -r CICD/html/* gh-pages/
- name: Commit and push changes
working-directory: gh-pages
run: |
git config --global user.name 'github-actions'
git config --global user.email 'github-actions@github.com'
git add .
git commit -m "Update HTML output"
git push origin gh-pages