Release book to S3 (#38)

This will automatically release the book to S3 after merging pull
requests
This commit is contained in:
Hendrik Kleinwaechter
2023-01-12 15:49:47 +01:00
committed by GitHub
parent 7ba8510da1
commit 8617acc687
3 changed files with 21 additions and 22 deletions

View File

@@ -1,22 +1,27 @@
name: Release LaTeX Document
on:
push:
tags:
- 'v*'
branches:
- main
jobs:
build_latex:
build_and_release:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
- name: Set up git repository
uses: actions/checkout@v3
- uses: xu-cheng/texlive-action/full@v1
- name: Build the book
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
cd book
make all
make release
- name: Release
uses: softprops/action-gh-release@v1
- name: Release book on S3
uses: shallwefootball/s3-upload-action@master
with:
files: book/TheBreadCode-The-Sourdough-Framework.pdf
aws_key_id: ${{ secrets.AWS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY}}
aws_bucket: ${{ secrets.AWS_BUCKET }}
source_dir: book/release
destination_dir: release

View File

@@ -1,23 +1,15 @@
name: Validate LaTeX Document
on:
pull_request:
branches:
- main
on: [ push ]
jobs:
build_latex:
test_building_book:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
- name: Set up git repository
uses: actions/checkout@v3
- name: Build book
- name: Test building book
uses: xu-cheng/texlive-action/full@v1
with:
run: |
apk add make
cd book
make all
- name: Upload PDF
uses: actions/upload-artifact@v3
with:
name: PDF
path: book/book.pdf

View File

@@ -18,4 +18,6 @@ clean:
rm book.log
release:
cp book.pdf TheBreadCode-The-Sourdough-Framework.pdf
rm -rf release
mkdir release
cp book.pdf release/TheBreadCode-The-Sourdough-Framework.pdf