Skip to content

Commit 1c5408b

Browse files
authored
Use new GitHub actions (#110)
* Use new GitHub actions * Tidy names * Add Format action * Format * Add JuliaFormatter config
1 parent cc6439e commit 1c5408b

File tree

5 files changed

+16
-93
lines changed

5 files changed

+16
-93
lines changed

.JuliaFormatter.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
style = "blue"
2+
format_markdown = true

.github/workflows/Docs.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,11 @@ concurrency:
1818
permissions:
1919
contents: write
2020
pull-requests: read
21-
statuses: write
2221

2322
jobs:
2423
docs:
2524
runs-on: ubuntu-latest
25+
2626
steps:
27-
- uses: actions/checkout@v2
28-
- uses: julia-actions/setup-julia@latest
29-
with:
30-
version: '1'
31-
- name: Install dependencies
32-
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
33-
- name: Build and deploy
34-
env:
35-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # For authentication with GitHub Actions token
36-
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # For authentication with SSH deploy key
37-
JULIA_DEBUG: Documenter # Print `@debug` statements (https://github.com/JuliaDocs/Documenter.jl/issues/955)
38-
run: julia --project=docs/ docs/make.jl
27+
- name: Build and deploy Documenter.jl docs
28+
uses: TuringLang/DocsNav/DocsDocumenter@v2

.github/workflows/DocsNav.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/Format.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: Format
33
on:
44
push:
55
branches:
6-
# This is where pull requests from "bors r+" are built.
7-
- staging
8-
# This is where pull requests from "bors try" are built.
9-
- trying
10-
# Build the main branch.
6+
- main
7+
pull_request:
8+
branches:
119
- main
1210

1311
concurrency:
@@ -19,20 +17,7 @@ concurrency:
1917
jobs:
2018
format:
2119
runs-on: ubuntu-latest
20+
2221
steps:
23-
- uses: actions/checkout@v2
24-
- uses: julia-actions/setup-julia@latest
25-
with:
26-
version: 1
2722
- name: Format code
28-
run: |
29-
using Pkg
30-
Pkg.add(; name="JuliaFormatter", uuid="98e50ef6-434e-11e9-1051-2b60c6c9e899")
31-
using JuliaFormatter
32-
format("."; verbose=true)
33-
shell: julia --color=yes {0}
34-
- uses: reviewdog/action-suggester@v1
35-
if: github.event_name == 'pull_request'
36-
with:
37-
tool_name: JuliaFormatter
38-
fail_on_error: true
23+
uses: TuringLang/actions/Format@v2

docs/make.jl

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,12 @@ using Documenter
22
using AbstractPPL
33

44
# Doctest setup
5-
DocMeta.setdocmeta!(AbstractPPL, :DocTestSetup, :(using AbstractPPL); recursive=true)
5+
DocMeta.setdocmeta!(AbstractPPL, :DocTestSetup, :(using AbstractPPL); recursive = true)
66

77
makedocs(;
8-
sitename="AbstractPPL",
9-
modules=[AbstractPPL],
10-
pages=[
11-
"Home" => "index.md",
12-
"API" => "api.md",
13-
],
14-
checkdocs=:exports,
15-
doctest=false,
8+
sitename = "AbstractPPL",
9+
modules = [AbstractPPL],
10+
pages = ["Home" => "index.md", "API" => "api.md"],
11+
checkdocs = :exports,
12+
doctest = false,
1613
)
17-
18-
deploydocs(; repo="github.com/TuringLang/AbstractPPL.jl.git", push_preview=true)

0 commit comments

Comments
 (0)