Skip to content

Add CI #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "CI"

on:
push:
pull_request:

jobs:
build-book:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout repository

- name: Install mdbook
run: |
mkdir bin
wget https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz
tar xf mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz --directory=bin
echo "${{github.workspace}}/bin" >> ${GITHUB_PATH}
# not yet in PATH due to missing source command
bin/mdbook --version

- name: Build book
run: |
make all

- name: publish book
uses: peaceiris/[email protected]
if: success() && github.ref == 'refs/heads/main' # only deploy main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: books
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
books
bin/
*.tar.gz

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
all: meta beginner cookbook intermediate synthesis

beginner:
mdbook build src/beginner

cookbook:
mdbook build src/cookbook

intermediate:
mdbook build src/intermediate

synthesis:
mdbook build src/synthesis

meta:
mkdir -p books
cp combined-index.html books/index.html

clean:
rm -rf books
21 changes: 21 additions & 0 deletions combined-index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<html lang="en" class="light" dir="ltr">
<head>
<meta charset="UTF-8">
<title>SuperCollider Books</title>

<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#ffffff">

</head>
<body class="sidebar-visible no-js">
<h1>SuperCollider books</h1>
<ul>
<li><a href="beginner/index.html">Beginner</a></li>
<li><a href="cookbook/index.html">Cookbook</a></li>
<li><a href="intermediate/index.html">Intermediate</a></li>
<li><a href="synthesis/index.html">Synthesis</a></li>
</ul>
</body>
</html>