Skip to content

Scheduled deploy

Scheduled deploy #33

Workflow file for this run

name: Scheduled deploy
on:
schedule:
- cron: '59 23 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Build
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: yyupw
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Get Docker image
run: docker compose pull
- name: PDF build
run: docker compose up --abort-on-container-exit
- name: Push PDF file
uses: actions/upload-artifact@v4
with:
name: trpl book japanese
path: book.pdf
if: ${{ github.ref == 'refs/heads/master' }}
release:
name: Publish artifact to gh-pages
if: github.ref == 'refs/heads/master'
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download PDF
uses: actions/download-artifact@v4
with:
name: trpl book japanese
path: ./build/
- name: Deploy to gh-pages
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build
TARGET_FOLDER: ./
CLEAN: true