From 9801be99e48a949b7f963ec74d656aaef51eaa10 Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Sun, 28 Feb 2021 15:56:22 -0500 Subject: [PATCH 1/3] Run `DocumenterTools.generate()` --- docs/.gitignore | 2 ++ docs/Project.toml | 2 ++ docs/make.jl | 15 +++++++++++++++ docs/src/index.md | 3 +++ 4 files changed, 22 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/Project.toml create mode 100644 docs/make.jl create mode 100644 docs/src/index.md diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..a303fff --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +build/ +site/ diff --git a/docs/Project.toml b/docs/Project.toml new file mode 100644 index 0000000..dfa65cd --- /dev/null +++ b/docs/Project.toml @@ -0,0 +1,2 @@ +[deps] +Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" diff --git a/docs/make.jl b/docs/make.jl new file mode 100644 index 0000000..a443ebc --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,15 @@ +using Documenter +using Tokenize + +makedocs( + sitename = "Tokenize", + format = Documenter.HTML(), + modules = [Tokenize] +) + +# Documenter can also automatically deploy documentation to gh-pages. +# See "Hosting Documentation" and deploydocs() in the Documenter manual +# for more information. +#=deploydocs( + repo = "" +)=# diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..6eb8e8e --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,3 @@ +# Tokenize.jl + +Documentation for Tokenize.jl From ef811c98449b861ae3c4a93ef3394b53e3938bff Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Sun, 28 Feb 2021 16:42:11 -0500 Subject: [PATCH 2/3] Emit existing docstrings --- docs/make.jl | 5 ++++- docs/src/index.md | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/make.jl b/docs/make.jl index a443ebc..154239f 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,7 +4,10 @@ using Tokenize makedocs( sitename = "Tokenize", format = Documenter.HTML(), - modules = [Tokenize] + modules = [Tokenize], + pages=[ + "Home" => "index.md", + ], ) # Documenter can also automatically deploy documentation to gh-pages. diff --git a/docs/src/index.md b/docs/src/index.md index 6eb8e8e..b0c0cbd 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -1,3 +1,10 @@ # Tokenize.jl Documentation for Tokenize.jl + +```@autodocs +Modules = [ + Tokenize, + Tokenize.Lexers +] +``` \ No newline at end of file From a4e0bca85bf5a662cfbf45384d917e83be77ffba Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Sun, 28 Feb 2021 16:59:18 -0500 Subject: [PATCH 3/3] Deploy docs with GitHub Actions --- .github/workflows/CI.yml | 18 +++++++++++++++++- docs/make.jl | 11 +++++------ 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 08e7ec3..8f6fdce 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -46,4 +46,20 @@ jobs: - uses: codecov/codecov-action@v1 with: file: lcov.info - + docs: + name: 'Documentation' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: julia-actions/setup-julia@v1 + with: + version: '1' + - run: | + julia --project=docs -e ' + using Pkg + Pkg.develop(PackageSpec(path=pwd())) + Pkg.instantiate()' + - run: julia --project=docs --color=yes docs/make.jl + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} diff --git a/docs/make.jl b/docs/make.jl index 154239f..4dc5c8e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -10,9 +10,8 @@ makedocs( ], ) -# Documenter can also automatically deploy documentation to gh-pages. -# See "Hosting Documentation" and deploydocs() in the Documenter manual -# for more information. -#=deploydocs( - repo = "" -)=# +deploydocs( + repo = "github.com/JuliaLang/Tokenize.jl.git", + devbranch = "master", + push_preview = true, +)