polymers 0.3.7

Polymers Modeling Library
Documentation
name: Pages
on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]
  release:
    types: [ "published" ]
permissions:
  contents: read
  pages: write
  id-token: write
concurrency:
  group: "pages"
  cancel-in-progress: true
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/configure-pages@v3
      - uses: actions/jekyll-build-pages@v1
        with:
          source: ./pages/
          destination: ./_site
      - name: get
        id: last_release
        uses: InsonusK/get-latest-release@v1.0.1
        with:
          myToken: ${{ github.token }}
          view_top: 1
      - name: latest docs rust
        run: |
          sudo chmod -R 777 _site/
          mkdir -p _site/rust/docs/
          cargo doc --release
          grep -rl "polymers/index.html" target/ | xargs sed -i 's@polymers/index.html@latest/index.html@'
          cp -r target/doc/* _site/rust/docs/
          mv _site/rust/docs/polymers/ _site/rust/docs/latest/
      - name: stable docs julia
        run: |
          julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${{ steps.last_release.outputs.tag_name }}'")'
          mkdir -p _site/julia/docs/stable/
          julia -e 'using Pkg; Pkg.add(["DocStringExtensions", "Documenter"])'
          julia docs/make.jl
          grep -rl "footer-message" docs/build/ | xargs sed -i 's@<p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p>@<footer><a href="http://sandia.gov/" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="Sandia National Laboratories" longdesc="http://sandia.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/SNL_Horizontal_White.png" style="height:37px"></a>\&nbsp;\&nbsp;\&nbsp;<a href="http://energy.gov" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="U.S. Department of Energy" longdesc="http://energy.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/New_DOE_Logo_White.png" style="height:37px"></a>\&nbsp;\&nbsp;\&nbsp;<a href="http://nnsa.energy.gov/" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="National Nuclear Security Administration" longdesc="http://nnsa.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/NNSA Logo_White.png" style="height:37px"></a><br><br><div style="font-size: 0.8em">Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy\x27s National Nuclear Security Administration under contract DE-NA-0003525.</div></footer>@'
          cp -r docs/build/* _site/julia/docs/stable/
      - name: add latest julia
        if: github.event_name != 'pull_request'
        run: julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${GITHUB_REF##*/}'")'
      - name: add latest julia
        if: github.event_name == 'pull_request'
        run: julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${GITHUB_HEAD_REF##*/}'")'
      - name: latest docs julia
        run: |
          mkdir -p _site/julia/docs/latest/
          julia -e 'using Pkg; Pkg.add(["DocStringExtensions", "Documenter"])'
          julia docs/make.jl
          grep -rl "footer-message" docs/build/ | xargs sed -i 's@<p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p>@<footer><a href="http://sandia.gov/" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="Sandia National Laboratories" longdesc="http://sandia.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/SNL_Horizontal_White.png" style="height:37px"></a>\&nbsp;\&nbsp;\&nbsp;<a href="http://energy.gov" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="U.S. Department of Energy" longdesc="http://energy.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/New_DOE_Logo_White.png" style="height:37px"></a>\&nbsp;\&nbsp;\&nbsp;<a href="http://nnsa.energy.gov/" rel="noopener noreferrer" target="_blank" style="text-decoration: none"><img alt="National Nuclear Security Administration" longdesc="http://nnsa.gov" src="https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/NNSA Logo_White.png" style="height:37px"></a><br><br><div style="font-size: 0.8em">Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy\x27s National Nuclear Security Administration under contract DE-NA-0003525.</div></footer>@'
          cp -r docs/build/* _site/julia/docs/latest/
      - uses: actions/upload-pages-artifact@v1
  deploy:
    if: github.event_name != 'pull_request'
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    steps:
      - id: deployment
        uses: actions/deploy-pages@v2