Skip to content

create output in pages subdirectory, then publish it to github pages #101

create output in pages subdirectory, then publish it to github pages

create output in pages subdirectory, then publish it to github pages #101

Workflow file for this run

name: Book Deploy
on:
release:
types: [created]
push:
# all
workflow_dispatch:
jobs:
docker-build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-buildx-${{ hashFiles('poetry.lock') }}
# This build and push step does the same thing as `make docker-build`, but
# makes it easier to store and load caches, which is why we use it instead
- name: Build and Save Layers Locally
uses: docker/build-push-action@v5
with:
context: ./
file: ./Dockerfile
load: true
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
tags: python4compscience
- name: List Available Images
run: docker images
- name: Make Docker HTML (JBook: create html)

Check failure on line 42 in .github/workflows/deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/deploy.yml

Invalid workflow file

You have an error in your yaml syntax on line 42
run: make docker-html
- name: Check links - Markdown
uses: gaurav-nelson/github-action-markdown-link-check@v1
- name: Make Docker Linkcheck
run: make docker-linkcheck
- name: Make Docker PDF (JBook: create pdf)
run: |
make docker-pdf
sudo cp book/_build/latex/book.pdf book/_build/html/book.pdf
- name: Gather outputs in pages
run: |
mkdir -p pages
cp -a book/_build/html/* pages
cp -a book/_build/latex/book.pdf pages
# Deploy output to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./pages
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "Development Build"
files: book/_build/latex/book.pdf