chore: update CI for the docs #131
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '30 1 * * *' | |
repository_dispatch: | |
types: | |
- rebuild | |
jobs: | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
cache: 'pip' | |
- name: Install dependencies | |
run: pip install -r requirements.txt | |
- name: Build | |
run: mkdocs build | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: docs | |
path: site | |
fluid: | |
name: Fluid documentation | |
strategy: | |
matrix: | |
branch: | |
- master | |
- develop | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: | | |
set -x | |
wget -qO - 'http://archive.neon.kde.org/public.key' | sudo apt-key add - | |
sudo apt-add-repository http://archive.neon.kde.org/user | |
sudo apt-get update -y | |
sudo apt-get install -y git qtbase5-dev qtdeclarative5-dev qtquickcontrols2-5-dev qttools5-dev libqt5svg5-dev qdoc-qt5 qt5-doc qtbase5-doc | |
- name: Clone | |
run: git clone --recursive -b ${{ matrix.branch }} git://github.com/lirios/fluid | |
- name: Build | |
run: | | |
set -x | |
cd fluid | |
mkdir -p build | |
cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DFLUID_WITH_DOCUMENTATION:BOOL=ON -DFLUID_WITH_DEMO:BOOL=OFF -DFLUID_WITH_QML_MODULES:BOOL=OFF -DFLUID_INSTALL_ICONS:BOOL=OFF | |
make -j $(getconf _NPROCESSORS_ONLN) | |
sudo make install | |
cd ../.. | |
- name: Copy | |
run: | | |
set -x | |
cp -R /usr/share/doc/fluid/html/ site | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: fluid-${{ matrix.branch }} | |
path: site | |
publish: | |
name: Publishing | |
needs: [docs, fluid] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
persist-credentials: false | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
path: site | |
- name: Set up | |
run: | | |
set -x | |
mkdir -p output/sdk/fluid | |
ls -al site | |
# Copy Fluid documentation | |
for branch in master develop; do | |
mv site/fluid-${branch} output/sdk/fluid/${branch} | |
done | |
# Copy files generated by mkdocs | |
rsync -avz site/docs/ output/ | |
# Set CNAME | |
echo docs.liri.io > output/CNAME | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: output |