From 12d93017d07f64d344011f466aa6714a4a06cdee Mon Sep 17 00:00:00 2001 From: joshday Date: Mon, 5 Oct 2020 16:57:17 -0400 Subject: [PATCH] try gh actions deployment for docs --- .github/workflows/Documenter.yml | 24 ++++++++++++++++++++++++ .github/workflows/TagBot.yml | 3 ++- .travis.yml | 8 -------- docs/src/bivariate.md | 13 +++++++++++++ docs/src/univariate.md | 13 +++++++++++++ 5 files changed, 52 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/Documenter.yml create mode 100644 docs/src/bivariate.md create mode 100644 docs/src/univariate.md diff --git a/.github/workflows/Documenter.yml b/.github/workflows/Documenter.yml new file mode 100644 index 0000000..cf0a23d --- /dev/null +++ b/.github/workflows/Documenter.yml @@ -0,0 +1,24 @@ +name: Documentation + +on: + push: + branches: + - master + tags: '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@latest + with: + version: '1.4' + - name: Install dependencies + run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key + run: julia --project=docs/ docs/make.jl \ No newline at end of file diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml index d77d3a0..69ba001 100644 --- a/.github/workflows/TagBot.yml +++ b/.github/workflows/TagBot.yml @@ -1,7 +1,7 @@ name: TagBot on: schedule: - - cron: 0 * * * * + - cron: 0 0 * * * jobs: TagBot: runs-on: ubuntu-latest @@ -9,3 +9,4 @@ jobs: - uses: JuliaRegistries/TagBot@v1 with: token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 5bfb3a0..2589924 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,11 +14,3 @@ after_success: jobs: allow_failures: - julia: nightly - include: - - stage: "Documentation" - julia: 1.4 - os: linux - script: - - julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));Pkg.instantiate()' - - julia --project=docs/ docs/make.jl - after_success: skip diff --git a/docs/src/bivariate.md b/docs/src/bivariate.md new file mode 100644 index 0000000..a9e5575 --- /dev/null +++ b/docs/src/bivariate.md @@ -0,0 +1,13 @@ +# Bivariate Example + + +```@example +using AverageShiftedHistograms, Plots + +x = randn(10_000) +y = x + randn(10_000) + +o = ash(x, y) + +plot(o) +``` diff --git a/docs/src/univariate.md b/docs/src/univariate.md new file mode 100644 index 0000000..9ce4837 --- /dev/null +++ b/docs/src/univariate.md @@ -0,0 +1,13 @@ +# Univariate Example + +```@example +using AverageShiftedHistograms, Plots + +y = randn(100_000) + +o = ash(y; rng = -5:.2:5) + +xy(o) # return (rng, density) + +plot(plot(o), plot(o; hist=false), layout=(2,1)) +``` \ No newline at end of file