diff --git a/.github/workflows/docs_clean_up.yml b/.github/workflows/docs_clean_up.yml new file mode 100644 index 0000000..22d9043 --- /dev/null +++ b/.github/workflows/docs_clean_up.yml @@ -0,0 +1,26 @@ +name: Doc Preview Cleanup + +on: + pull_request: + types: [closed] + +jobs: + doc-preview-cleanup: + runs-on: ubuntu-latest + steps: + - name: Checkout gh-pages branch + uses: actions/checkout@v2 + with: + ref: gh-pages + - name: Delete preview and history + push changes + run: | + if [ -d "previews/PR$PRNUM" ]; then + git config user.name "Documenter.jl" + git config user.email "documenter@juliadocs.github.io" + git rm -rf "previews/PR$PRNUM" + git commit -m "delete preview" + git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}) + git push --force origin gh-pages-new:gh-pages + fi + env: + PRNUM: ${{ github.event.number }} \ No newline at end of file diff --git a/Project.toml b/Project.toml index 8d03b4c..57dda58 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ACTRModels" uuid = "c095b0ea-a6ca-5cbd-afed-dbab2e976880" authors = ["itsdfish"] -version = "0.12.3" +version = "0.12.4" [deps] ConcreteStructs = "2569d6c7-a4a2-43d3-a901-331e8e4be471" diff --git a/src/MemoryFunctions.jl b/src/MemoryFunctions.jl index be00622..9c9b2ca 100644 --- a/src/MemoryFunctions.jl +++ b/src/MemoryFunctions.jl @@ -35,7 +35,7 @@ function baselevel!(N, L, k, lags, d) if N > k tk = lags[k] x1 = (N - k) * (L^(1 - d) - tk^(1 - d)) - x2 = (1 - d) * (L - tk) + x2 = (1 - d) * max(L - tk, .001) approx = x1 / x2 end return log(exp(exact) + approx)