From 25b750ad42cf7150657fbd19afc5f55ae4b3d8be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Lipt=C3=A1k?= Date: Mon, 21 Jun 2021 17:05:41 -0400 Subject: [PATCH] Add Github Actions build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gábor Lipták --- .github/workflows/ci.yml | 51 ++++++++++++++++++++++++++++++++++++++++ src/conf.py | 2 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..4a7cccb0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,51 @@ +name: ci +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build image + run: docker build -t crypto101 docker/ + - name: Generate documents + shell: 'script -q -e -c "bash {0}"' + run: | + set -x + set -e + docker run --rm -it -v ${{ github.workspace }}:/repo crypto101 ./build_release ./_release/ + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-en.epub + path: _release/crypto101-en.epub + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-en.pdf + path: _release/crypto101-en.pdf + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-en_html.tar.gz + path: _release/crypto101-en_html.tar.gz + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-fr.epub + path: _release/crypto101-fr.epub + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-fr.pdf + path: _release/crypto101-fr.pdf + - name: Upload document + uses: actions/upload-artifact@v2 + with: + name: crypto101-fr_html.tar.gz + path: _release/crypto101-fr_html.tar.gz diff --git a/src/conf.py b/src/conf.py index 456b81db..a39d0acf 100644 --- a/src/conf.py +++ b/src/conf.py @@ -58,7 +58,7 @@ def run_command(*args): version = run_command("git", "rev-parse", "--short", "HEAD") -release = run_command("git", "describe") +release = run_command("git", "describe", "--always") # i18n configuration locale_dirs = ["locale/"]