Skip to content

Commit

Permalink
Create and update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed May 7, 2024
1 parent b727265 commit 448118e
Show file tree
Hide file tree
Showing 8 changed files with 152 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

name: CompatHelper
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
CompatHelper:
runs-on: ubuntu-latest
steps:
- name: Check if Julia is already available in the PATH
id: julia_in_path
run: which julia
continue-on-error: true
- name: Install Julia, but only if it is not already available in the PATH
uses: julia-actions/setup-julia@v1
with:
version: '1'
arch: ${{ runner.arch }}
if: steps.julia_in_path.outcome != 'success'
- name: "Add the General registry via Git"
run: |
import Pkg
ENV["JULIA_PKG_SERVER"] = ""
Pkg.Registry.add("General")
shell: julia --color=yes {0}
- name: "Install CompatHelper"
run: |
import Pkg
name = "CompatHelper"
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
version = "3"
Pkg.add(; name, uuid, version)
shell: julia --color=yes {0}
- name: "Run CompatHelper"
run: |
import CompatHelper
CompatHelper.main()
shell: julia --color=yes {0}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
32 changes: 32 additions & 0 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

name: TagBot
on:
issue_comment:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
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 }}
3 changes: 3 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- main
tags: '*'
pull_request:
branches:
- main
tags: '*'
jobs:
build:
permissions:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

name: README
on:
push:
paths:
- 'HEADER.md'
- 'docs/src/index.md'
- 'docs/src/assets/logo.svg'
- '.github/workflows/readme.yml'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- run: julia --color=yes readme.jl
- run: |
git config user.name github-actions
git config user.email [email protected]
git diff --quiet || (git add . && git commit -m "Regenerate \`README.md\`")
git push
17 changes: 17 additions & 0 deletions HEADER.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

<p align="center"><img height="200px" src="docs/src/assets/logo.svg"/></p>

<div align="center">

<!-- [![Documentation stable](https://img.shields.io/badge/Documentation-stable-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/stable/) -->
[![Documentation dev](https://img.shields.io/badge/Documentation-dev-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/dev/)

[![Documentation](https://github.com/jakobjpeters/Typstry.jl/workflows/Documentation/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/documentation.yml)
[![Continuous Integration](https://github.com/jakobjpeters/Typstry.jl/workflows/Continuous%20Integration/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/continuous_integration.yml)

[![Codecov](https://codecov.io/gh/jakobjpeters/Typstry.jl/branch/main/graph/badge.svg?token=XFWU66WSD7)](https://codecov.io/gh/jakobjpeters/Typstry.jl)
<!-- [![Dependents](https://docs.juliahub.com/Typstry/deps.svg)](https://juliahub.com/ui/Packages/Typstry/????) -->

</div>

# Typstry.jl
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@

<!-- This file is generated by `.github/workflows/readme.yml`; do not edit directly. -->

```@meta
DocTestSetup = :(using Typstry)
```
<p align="center"><img height="200px" src="docs/src/assets/logo.svg"/></p>

<div align="center">

<!-- [![Documentation stable](https://img.shields.io/badge/Documentation-stable-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/stable/) -->
[![Documentation dev](https://img.shields.io/badge/Documentation-dev-blue.svg)](https://jakobjpeters.github.io/Typstry.jl/dev/)

[![Documentation](https://github.com/jakobjpeters/Typstry.jl/workflows/Documentation/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/documentation.yml)
[![Continuous Integration](https://github.com/jakobjpeters/Typstry.jl/workflows/Continuous%20Integration/badge.svg)](https://github.com/jakobjpeters/Typstry.jl/actions/workflows/continuous_integration.yml)

[![Codecov](https://codecov.io/gh/jakobjpeters/Typstry.jl/branch/main/graph/badge.svg?token=XFWU66WSD7)](https://codecov.io/gh/jakobjpeters/Typstry.jl)
<!-- [![Dependents](https://docs.juliahub.com/Typstry/deps.svg)](https://juliahub.com/ui/Packages/Typstry/????) -->

</div>

# Typstry.jl

## Introduction

See also Typst's [website](https://typst.app/),
[documentation](https://typst.app/docs/),
and [repository](https://github.com/typst/typst).
Expand Down Expand Up @@ -40,6 +54,7 @@ julia> using Typstry

- [TypstGenerator.jl](https://github.com/onecalfman/TypstGenerator.jl)
- [Labelyst.jl](https://github.com/emanuel-kopp/Labelyst.jl)
- [SummaryTables.jl](https://github.com/PumasAI/SummaryTables.jl)

### LaTeX

Expand Down
4 changes: 3 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
DocTestSetup = :(using Typstry)
```

# Typstry.jl
# Home

## Introduction

See also Typst's [website](https://typst.app/),
[documentation](https://typst.app/docs/),
Expand Down
11 changes: 11 additions & 0 deletions readme.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

const delimiter = "## Introduction"

write("README.md", "\n" * join((
"<!-- This file is generated by `.github/workflows/readme.yml`; do not edit directly. -->",
read("HEADER.md", String),
delimiter * replace(
last(split(read("docs/src/index.md", String), delimiter)),
"jldoctest" => "julia"
)
), "\n"))

0 comments on commit 448118e

Please sign in to comment.