diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d60f070 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" # Location of package manifests + schedule: + interval: "monthly" diff --git a/.github/workflows/TagBot.yml b/.github/workflows/TagBot.yml new file mode 100644 index 0000000..f49313b --- /dev/null +++ b/.github/workflows/TagBot.yml @@ -0,0 +1,15 @@ +name: TagBot +on: + issue_comment: + types: + - created + workflow_dispatch: +jobs: + TagBot: + if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot' + runs-on: ubuntu-latest + steps: + - uses: JuliaRegistries/TagBot@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ssh: ${{ secrets.DOCUMENTER_KEY }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6283284 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + pull_request: + push: + branches: main + tags: '*' + +jobs: + test: + name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - ${{ github.event_name }} + runs-on: ${{ matrix.os }} + timeout-minutes: 40 + continue-on-error: ${{ matrix.julia-version == 'nightly' }} + strategy: + matrix: + julia-version: ['1.9'] + os: ['ubuntu-latest'] + include: + - os: macOS-latest + julia-version: '1.9' + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: ${{ matrix.julia-version }} + - name: Install dependencies + run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.add(url="https://github.com/Ferrite-FEM/Ferrite.jl.git", rev="7e8a571"); Pkg.precompile()' + - uses: julia-actions/julia-runtest@v1 + - uses: julia-actions/julia-processcoverage@v1 + with: + directories: 'src,ext' + - uses: codecov/codecov-action@v3 + with: + file: lcov.info + diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..4027efb --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,33 @@ +name: Documentation + +on: + push: + branches: + - main + tags: '*' + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 40 + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v1 + with: + version: '1.9' + - uses: actions/cache@v3 + with: + path: | + ~/.julia/artifacts + ~/.julia/packages + ~/.julia/registries + key: .julia-docs-${{ hashFiles('docs/Project.toml', 'docs/Manifest.toml') }} + - name: Install dependencies + run: julia --project=docs -e 'using Pkg; Pkg.instantiate(); Pkg.add(url="https://github.com/Ferrite-FEM/Ferrite.jl.git", rev="7e8a571"); Pkg.precompile()' + - name: Build and deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} + GKSwstype: '100' + run: julia --project=docs --color=yes docs/make.jl diff --git a/docs/make.jl b/docs/make.jl index 7b9e552..7e4fb04 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -38,16 +38,17 @@ makedocs( ] ) -# if !liveserver -# @timeit dto "deploydocs" deploydocs( -# repo = "github.com/Ferrite-FEM/FerriteDistributed.jl.git", -# push_preview=true, -# versions = [ -# "stable" => "v^", -# "v#.#", -# "dev" => "dev" -# ] -# ) -# end +if !liveserver + @timeit dto "deploydocs" deploydocs( + repo = "github.com/Ferrite-FEM/FerriteDistributed.jl.git", + push_preview=true, + versions = [ + "stable" => "v^", + "v#.#", + "dev" => "dev" + ], + forcepush = true, + ) +end print_timer(dto)