build(deps): bump actions/checkout from 3 to 4 #172
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: 'docs' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '!docs/**' | |
- '!.github/workflows/**' | |
- '.github/workflows/Docs.yml' | |
- '.github/micromamba/docs.yml' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- '!docs/**' | |
- '!.github/workflows/**' | |
- '.github/workflows/Docs.yml' | |
- '.github/micromamba/docs.yml' | |
defaults: | |
run: | |
shell: bash -l {0} | |
env: | |
CMAKE_VERSION: '3.16.x' | |
CMAKE_BUILD_TYPE: 'Release' | |
CMAKE_BUILD_PREFIX: './build' | |
CMAKE_INSTALL_PREFIX: './install' | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
name: 'π Docs' | |
steps: | |
- name: 'π§° Checkout' | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: 'π¨ Install packages' | |
run: sudo apt-get install dia mscgen inkscape | |
- name: 'π Install Conda environment' | |
uses: mamba-org/provision-with-micromamba@v15 | |
with: | |
environment-file: .github/micromamba/docs.yml | |
- name: 'π¨ Install miktex' | |
run: | | |
curl -k -O -L https://mirrors.ustc.edu.cn/CTAN/systems/win32/miktex/setup/deb/pool/universe/m/miktex/miktex_22.8.28-focal1_amd64.deb | |
sudo apt install ./miktex_22.8.28-focal1_amd64.deb | |
sudo miktexsetup --shared=yes finish | |
sudo initexmf --admin --set-config-value [MPM]AutoInstall=1 | |
- name: 'π¨ Setup CMake' | |
uses: jwlawson/[email protected] | |
with: | |
cmake-version: '${{env.CMAKE_VERSION}}' | |
github-api-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: 'π§ Configure' | |
run: cmake -S . -B ${{ env.CMAKE_BUILD_PREFIX }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DBUILD_DOCS=ON -DCMAKE_PREFIX_PATH="~/micromamba" | |
- name: 'βοΈ Build' | |
run: cmake --build ${{ env.CMAKE_BUILD_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel 2 --target all docs | |
- name: 'π₯ Install' | |
run: cmake --install ${{ env.CMAKE_BUILD_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --strip | |
&& mv ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/YAODAQ/pdf/YAODAQ_Manual.pdf ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/YAODAQ/html/YAODAQ_Manual.pdf | |
- name: 'π Deploy' | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.REPOS_ACCESS }} | |
REPOSITORY_NAME: yaodaq/yaodaq.github.io | |
BRANCH: main | |
FOLDER: ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/YAODAQ/html/ | |
TARGET_FOLDER: YAODAQ |