docs.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. name: Build and Deploy Docs
  2. on:
  3. # Run on pushes targeting the default branch
  4. push:
  5. branches: [ master ]
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  9. permissions:
  10. contents: read
  11. pages: write
  12. id-token: write
  13. # Allow only one concurrent deployment, skipping runs queued between any
  14. # in-progress and latest queued runs. However, do not cancel in-progress runs
  15. # as we want to allow these production deployments to complete.
  16. concurrency:
  17. group: "pages"
  18. cancel-in-progress: false
  19. jobs:
  20. build:
  21. name: Build Docs
  22. runs-on: ubuntu-20.04
  23. steps:
  24. - name: Install Dependencies
  25. run: |
  26. sudo apt update && sudo apt install -y \
  27. apt-transport-https \
  28. apt-file \
  29. software-properties-common \
  30. build-essential \
  31. autotools-dev \
  32. autoconf \
  33. automake \
  34. make \
  35. pkgconf \
  36. libboost-all-dev \
  37. libevent-dev \
  38. gperf \
  39. uuid-dev \
  40. sphinx-doc \
  41. sphinx-common \
  42. python3-sphinx
  43. - name: Clone Repository
  44. uses: actions/checkout@v4
  45. - name: Bootstrap
  46. run: |
  47. if [ -f "/etc/lsb-release" ]; then
  48. cat /etc/lsb-release
  49. fi
  50. ./bootstrap.sh -a
  51. shell: bash
  52. - name: Configure
  53. run: |
  54. ./configure
  55. shell: bash
  56. - name: Build HTML Documentation
  57. run: make -C docs dirhtml
  58. - name: Setup Pages
  59. uses: actions/configure-pages@v5
  60. - name: Upload Artifacts
  61. uses: actions/upload-pages-artifact@v3
  62. with:
  63. path: 'docs/build/dirhtml'
  64. deploy:
  65. name: Deploy Docs
  66. # Add a dependency on the build job
  67. needs: build
  68. runs-on: ubuntu-latest
  69. environment:
  70. name: github-pages
  71. url: ${{ steps.deployment.outputs.page_url }}
  72. steps:
  73. - name: Deploy to GitHub Pages
  74. id: deployment
  75. uses: actions/deploy-pages@v4