Skip to content

Commit

Permalink
Move readme.jl to scripts/
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed Aug 17, 2024
1 parent 334cd4f commit e643d43
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,21 @@
name: README
on:
push:
branches:
- 'main'
paths:
- 'HEADER.md'
- 'docs/src/index.md'
- 'docs/src/assets/**'
- '.github/workflows/readme.yml'
branches:
- main
pull_request:
paths:
- 'HEADER.md'
- 'docs/src/index.md'
- 'docs/src/assets/**'
- '.github/workflows/readme.yml'
- 'docs/source/index.md'
- 'docs/source/assets/logo.svg'
- 'scripts/readme.jl'
- 'HEADER.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- run: julia --color=yes readme.jl
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
- run: julia --color=yes scripts/readme.jl
- run: |
git config user.name github-actions
git config user.email [email protected]
Expand Down
11 changes: 0 additions & 11 deletions readme.jl

This file was deleted.

10 changes: 10 additions & 0 deletions HEADER.md → scripts/readme.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

const introduction = "## Introduction"
const header = """
<!-- This file is generated by `.github/workflows/readme.yml`; do not edit directly. -->
<p align="center"><img width="200px" src="docs/src/assets/logo.svg"/></p>
<div align="center">
Expand All @@ -15,3 +20,8 @@
</div>
# PAndQ.jl
"""

write("README.md", header * introduction * replace(last(split(read(
"docs/src/index.md", String), introduction)), "jldoctest" => "julia"))

0 comments on commit e643d43

Please sign in to comment.