mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-11-29 14:23:58 -06:00
I feel like since this is bread related, release should be renamed to "bake". So `make bake` will bake you the final book versions.
38 lines
1.3 KiB
YAML
38 lines
1.3 KiB
YAML
name: Release LaTeX Document
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
build_and_release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up git repository
|
|
uses: actions/checkout@v3
|
|
- name: Bake the book
|
|
uses: xu-cheng/texlive-action/full@v1
|
|
with:
|
|
run: |
|
|
apk add make zip tidyhtml
|
|
wget https://archive.org/download/kindlegen_linux_2_6_i386_v2_9/kindlegen_linux_2.6_i386_v2_9.tar.gz
|
|
tar xzf kindlegen_linux_2.6_i386_v2_9.tar.gz
|
|
mv kindlegen /usr/bin
|
|
cd book
|
|
make bake
|
|
- name: Release baked book to S3
|
|
uses: shallwefootball/s3-upload-action@master
|
|
with:
|
|
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
|
|
- name: Invalidate Cloudfront book cache
|
|
uses: chetan/invalidate-cloudfront-action@v2
|
|
env:
|
|
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}
|
|
PATHS: "/*"
|
|
AWS_REGION: "us-east-1"
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|