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/.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..4dc5c8e --- /dev/null +++ b/docs/make.jl @@ -0,0 +1,17 @@ +using Documenter +using Tokenize + +makedocs( + sitename = "Tokenize", + format = Documenter.HTML(), + modules = [Tokenize], + pages=[ + "Home" => "index.md", + ], +) + +deploydocs( + repo = "github.com/JuliaLang/Tokenize.jl.git", + devbranch = "master", + push_preview = true, +) diff --git a/docs/src/index.md b/docs/src/index.md new file mode 100644 index 0000000..b0c0cbd --- /dev/null +++ b/docs/src/index.md @@ -0,0 +1,10 @@ +# Tokenize.jl + +Documentation for Tokenize.jl + +```@autodocs +Modules = [ + Tokenize, + Tokenize.Lexers +] +``` \ No newline at end of file