added new styles #37
Workflow file for this run
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: | |
pull_request: | |
workflow_dispatch: | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: pages | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
name: 📚 Docs | |
steps: | |
- name: 🧰 Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: 📂 Load .env file | |
if: hashFiles('.github/workflows/.env') != '' | |
uses: xom9ikk/dotenv@v2 | |
with: | |
path: .github/workflows | |
- name: 🟨 Install packages | |
run: sudo apt-get install dia mscgen inkscape texlive-latex-recommended texlive-latex-extra | |
- name: 🐍 Install Conda environment | |
uses: mamba-org/provision-with-micromamba@v15 | |
with: | |
environment-file: .github/workflows/micromamba/docs.yml | |
- name: ⬇️ Setup CMake | |
uses: lukka/get-cmake@latest | |
with: | |
cmakeVersion: ^3 | |
ninjaVersion: ^1.11.1 | |
- name: 🔧 Configure | |
run: cmake -S ${{ env.CMAKE_SOURCE_PREFIX }} -B ${{ env.CMAKE_BINARY_PREFIX }} -DCMAKE_BUILD_TYPE=${{ env.CMAKE_BUILD_TYPE }} -DCMAKE_PREFIX_PATH="~/micromamba" -DCMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_PREFIX }} -D CPPTERMINAL_ENABLE_DOCS=ON | |
- name: ⚙️ Build | |
run: cmake --build ${{ env.CMAKE_BINARY_PREFIX }} --config ${{ env.CMAKE_BUILD_TYPE }} --parallel ${{ env.CMAKE_NUMBER_JOBS }} --target all doc-html | |
- name: 📥 Install | |
run: cmake --install ${{ env.CMAKE_BINARY_PREFIX }} --prefix ${{ env.CMAKE_INSTALL_PREFIX }} --strip # && mv ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/cpp-terminal/pdf/cpp-terminal_Manual.pdf ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/cpp-terminal/html/cpp-terminal_Manual.pdf | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ${{ env.CMAKE_INSTALL_PREFIX }}/share/doc/cpp-terminal/html/ | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: docs | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 |