Skip to content

Commit de34631

Browse files
authored
Merge pull request #158 from sandialabs/dev-r
README and pages stable julia
2 parents 82db0f3 + 3d85ed1 commit de34631

File tree

2 files changed

+27
-5
lines changed

2 files changed

+27
-5
lines changed

.github/workflows/pages.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
branches: [ "main" ]
55
pull_request:
66
branches: [ "main" ]
7+
release:
8+
types: [ "published" ]
79
permissions:
810
contents: read
911
pages: write
@@ -21,6 +23,12 @@ jobs:
2123
with:
2224
source: ./pages/
2325
destination: ./_site
26+
- name: get
27+
id: last_release
28+
uses: InsonusK/[email protected]
29+
with:
30+
myToken: ${{ github.token }}
31+
view_top: 1
2432
- name: latest docs rust
2533
run: |
2634
sudo chmod -R 777 _site/
@@ -29,14 +37,21 @@ jobs:
2937
grep -rl "polymers/index.html" target/ | xargs sed -i 's@polymers/index.html@latest/index.html@'
3038
cp -r target/doc/* _site/rust/docs/
3139
mv _site/rust/docs/polymers/ _site/rust/docs/latest/
32-
- name: add julia
40+
- name: stable docs julia
41+
run: |
42+
export LATEST_VERSION=$(echo ${{ steps.last_release.outputs.tag_name }} | cut -d v -f 2)
43+
julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${LATEST_VERSION}'")'
44+
mkdir -p _site/julia/docs/stable/
45+
julia -e 'using Pkg; Pkg.add(["DocStringExtensions", "Documenter"])'
46+
julia docs/make.jl
47+
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>@'
48+
cp -r docs/build/* _site/julia/docs/stable/
49+
- name: add latest julia
3350
if: github.event_name != 'pull_request'
3451
run: julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${GITHUB_REF##*/}'")'
35-
- name: add julia
52+
- name: add latest julia
3653
if: github.event_name == 'pull_request'
3754
run: julia -e 'using Pkg; Pkg.add(url="https://github.com/sandialabs/Polymers", rev="'${GITHUB_HEAD_REF##*/}'")'
38-
- name: build julia
39-
run: julia -e 'using Pkg; Pkg.build("Polymers")'
4055
- name: latest docs julia
4156
run: |
4257
mkdir -p _site/julia/docs/latest/

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@ pip install target/wheels/*.whl
3333
[![docs (stable)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-stable.svg)](https://sandialabs.github.io/Polymers/julia/docs/stable)
3434
[![docs (latest)](https://raw.githubusercontent.com/sandialabs/Polymers/main/pages/assets/images/julia-docs-latest.svg)](https://sandialabs.github.io/Polymers/julia/docs/latest)
3535

36-
The latest edition of the library can be installed as a Julia package:
36+
The library can be installed as a Julia package:
37+
38+
```julia
39+
using Pkg
40+
Pkg.add("Polymers")
41+
```
42+
43+
If Rust is installed, the latest edition of the library can be installed from the GitHub repository:
3744

3845
```julia
3946
using Pkg

0 commit comments

Comments
 (0)