mirror of
https://github.com/hendricius/the-sourdough-framework
synced 2025-12-06 01:24:24 -06:00
Build docker image for each PR (#300)
This builds a docker image for each PR and then one for the release tagged as :latest.
This commit is contained in:
committed by
GitHub
parent
354737861f
commit
bce4f84040
63
.github/workflows/test-book-website.yml
vendored
Normal file
63
.github/workflows/test-book-website.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: Test building book and website
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
IMAGE: ghcr.io/${{ github.repository }}:${{ github.event.pull_request.head.ref }}
|
||||
|
||||
jobs:
|
||||
build-and-push-image:
|
||||
uses: ./.github/workflows/docker-build-push.yml
|
||||
|
||||
test-building-book-website:
|
||||
needs: build-and-push-image
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set up git repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Print dependency versions
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ env.IMAGE }}
|
||||
options: -v ${{ github.workspace }}:/app
|
||||
run: |
|
||||
cd /app/book
|
||||
make show_tools_version
|
||||
- name: Print build variables
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ env.IMAGE }}
|
||||
options: -v ${{ github.workspace }}:/app
|
||||
run: |
|
||||
cd /app/book
|
||||
make printvars
|
||||
- name: Test baking the release versions
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ env.IMAGE }}
|
||||
options: -v ${{ github.workspace }}:/app
|
||||
run: |
|
||||
cd /app/book
|
||||
make -j build_serif_pdf build_ebook
|
||||
- name: Test building website
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ env.IMAGE }}
|
||||
options: -v ${{ github.workspace }}:/app
|
||||
run: |
|
||||
cd /app/book
|
||||
make -j website
|
||||
- name: Upload book Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: books
|
||||
path: |
|
||||
book/book_serif/book.log
|
||||
book/book_serif/book.pdf
|
||||
book/book-epub/book.epub
|
||||
- name: Upload website Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: website
|
||||
path: website/static_website_html
|
||||
Reference in New Issue
Block a user