Skip to content
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
42 changes: 42 additions & 0 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and release

on:
push:
branches: [ master ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/checkout@v2
- name: Install python requirements
run: pip3 install -r requirements.txt
- name: Pull docker container
run: docker pull thomasweise/docker-texlive-full
- name: Run .pdf build
run: doge build
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./build/main.pdf
asset_name: main.pdf
asset_content_type: application/pdf
23 changes: 23 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build

on:
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/checkout@v2
- name: Install python requirements
run: pip3 install -r requirements.txt
- name: Pull docker container
run: docker pull thomasweise/docker-texlive-full
- name: Run .pdf build
run: doge build

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Virtualenv
venv

# Build dir
build/
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# C++ lections

## How to build

### Prerequisites

You must have installed on your machine:

- python 3.7 or greater
- docker

### Installing dogebuild

This project uses [dogebuild](https://github.com/dogebuild/dogebuild) builder with [dogebuild-tex](https://github.com/dogebuild/dogebuild-tex) plugin.

To install required python modules you must call:

```sh
pip install -r requirements.txt
```

### Build .pdf

To build pdf call:

```sh
doge build
```

Builded .pdf will be in `build` directory.
9 changes: 9 additions & 0 deletions dogefile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from pathlib import Path

from dogebuild_tex import Tex, DockerTexBinary


Tex(
main_file=Path("cpp_lectures.tex"),
tex_binary=DockerTexBinary("thomasweise/docker-texlive-full"),
)
10 changes: 10 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
appdirs==1.4.4
colorlog==4.0.2
distlib==0.3.1
dogebuild==0.3.3
dogebuild-tex==0.1.3
filelock==3.0.12
gitsnapshot==0.1.2
six==1.15.0
toposort==1.5
virtualenv==20.4.2