Adding workflow badge for ISSM source code build; cleanup #5
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| # NOTE: | |
| # - Search https://ctan.org/ for package names of missing TeX Live packages as | |
| # needed | |
| # | |
| # TODO: | |
| # - Pull userguide.pdf from its workflow or otherwise incorporate it into this | |
| # workflow so that is available via direct download link (rather than blob in | |
| # source code repo) | |
| # - Then update link in docs/index.md | |
| # - Add test job to check for expected output given certain input on change to | |
| # latex2md.py? | |
| # | |
| name: Convert LaTeX Documentation to Markdown and Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - ".github/workflows/pages.yml" | |
| - "docs/assets/**" | |
| - "docs/getting-started/**" | |
| - "docs/installation/**" | |
| - "docs/publications/bibtex/references.bib" | |
| - "docs/publications/index.md" | |
| - "docs/supplements/**" | |
| - "docs/troubleshooting/**" | |
| - "docs/using-issm/**" | |
| - "docs/Gemfile" | |
| - "docs/Gemfile.lock" | |
| - "docs/index.md" | |
| # Run if 'Publications' page has been updated | |
| workflow_run: | |
| workflows: ["Update Publications Page"] | |
| types: | |
| - completed | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| BIBINPUTS: "./publications/bibtex/" | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow one concurrent deployment | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| # Build job | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: docs | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install TeX Live | |
| uses: teatimeguest/setup-texlive-action@v3 | |
| with: | |
| packages: | | |
| scheme-basic | |
| - name: Install dependencies for opendetex | |
| uses: awalsh128/cache-apt-pkgs-action@latest | |
| with: | |
| packages: libfl-dev | |
| version: 1.0 | |
| - name: Checkout opendetex source from repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: pkubowicz/opendetex | |
| path: '${{ github.workspace }}/ext/opendetex' | |
| - name: Compile and install opendetex | |
| run: | | |
| cd ${{ github.workspace }}/ext/opendetex | |
| make | |
| sudo make install | |
| - name: Convert LaTeX to Markdown | |
| run: | | |
| export BIBINPUTS=${{ env.BIBINPUTS }} | |
| ../bin/latex2jtd.sh ./ | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' # Not needed with a .ruby-version file | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| cache-version: 0 # Increment this number if you need to re-download cached gems | |
| working-directory: '${{ github.workspace }}/docs' | |
| - name: Setup Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Build with Jekyll | |
| # Outputs to the './_site' directory by default | |
| run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" | |
| env: | |
| JEKYLL_ENV: production | |
| - name: Upload artifact | |
| # Automatically uploads an artifact from the './_site' directory by default | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: "docs/_site/" | |
| # Deployment job | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |