forked from y-yu/trpl-2nd-pdf
-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (46 loc) · 1.27 KB
/
schedule.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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