Build and Deploy FAST Documentation #14
This file contains hidden or 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: Build and Deploy FAST Documentation | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Chechout FAST | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: smistad/FAST | |
| ref: master | |
| - name: Install dependencies | |
| run: | | |
| sudo apt install bison flex # Needed by Doxygen | |
| pip3 install jinja2 # Needed by M.css | |
| # - name: Cache Doxygen and M.CSS externals | |
| # uses: actions/cache@v4 | |
| # with: | |
| # path: | | |
| # ${{ github.workspace }}/build/external/doxygen/ | |
| # ${{ github.workspace }}/build/external/mcss/ | |
| # key: ${{ hashFiles('${{ github.workspace }}/cmake/ExternalDoxygen.cmake', '${{ github.workspace }}/cmake/ExternalMCSS.cmake') }} | |
| - name: Build docs | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake ../doc/ # This will only build the documentation of FAST | |
| make -j4 documentation | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: build/documentation/html/ | |
| retention-days: 1 | |
| deploy: | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |