|
| 1 | +## |
| 2 | +## Copyright (c) 2023 The Johns Hopkins University Applied Physics |
| 3 | +## Laboratory LLC. |
| 4 | +## |
| 5 | +## This file is part of the Asynchronous Network Managment System (ANMS). |
| 6 | +## |
| 7 | +## Licensed under the Apache License, Version 2.0 (the "License"); |
| 8 | +## you may not use this file except in compliance with the License. |
| 9 | +## You may obtain a copy of the License at |
| 10 | +## http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | +## Unless required by applicable law or agreed to in writing, software |
| 12 | +## distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +## See the License for the specific language governing permissions and |
| 15 | +## limitations under the License. |
| 16 | +## |
| 17 | +## This work was performed for the Jet Propulsion Laboratory, California |
| 18 | +## Institute of Technology, sponsored by the United States Government under |
| 19 | +## the prime contract 80NM0018D0004 between the Caltech and NASA under |
| 20 | +## subcontract 1658085. |
| 21 | +## |
| 22 | + |
| 23 | +name: Build documentation |
| 24 | + |
| 25 | +on: [push] |
| 26 | + |
| 27 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
| 28 | +permissions: |
| 29 | + contents: read |
| 30 | + pages: write |
| 31 | + id-token: write |
| 32 | + |
| 33 | +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. |
| 34 | +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. |
| 35 | +concurrency: |
| 36 | + group: "pages" |
| 37 | + cancel-in-progress: false |
| 38 | + |
| 39 | +jobs: |
| 40 | + build: |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v3 |
| 44 | + - name: dependencies |
| 45 | + run: | |
| 46 | + sudo apt-get update && sudo apt-get install -y cmake make coreutils ruby asciidoctor graphviz inkscape dblatex docbook-xsl-ns xsltproc xmlstarlet |
| 47 | + sudo gem install asciidoctor-diagram |
| 48 | + - name: build |
| 49 | + run: | |
| 50 | + DESTDIR=public ./build.sh |
| 51 | + - uses: actions/upload-artifact@v3 |
| 52 | + with: |
| 53 | + name: docs |
| 54 | + path: public |
| 55 | + |
| 56 | + deploy: |
| 57 | + environment: |
| 58 | + name: github-pages |
| 59 | + url: ${{ steps.deployment.outputs.page_url }} |
| 60 | + needs: build |
| 61 | + if: github.ref == 'refs/heads/main' |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/download-artifact@v3 |
| 65 | + with: |
| 66 | + name: docs |
| 67 | + path: public |
| 68 | + - name: Setup Pages |
| 69 | + uses: actions/configure-pages@v3 |
| 70 | + - name: Upload artifact |
| 71 | + uses: actions/upload-pages-artifact@v2 |
| 72 | + with: |
| 73 | + path: public |
| 74 | + - name: Deploy to GitHub Pages |
| 75 | + id: deployment |
| 76 | + uses: actions/deploy-pages@v2 |
0 commit comments