-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (49 loc) · 1.48 KB
/
build-daily.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
name: Build Daily Book
on:
workflow_dispatch:
# schedule:
# - cron: "3 16 * * *"
jobs:
build-deploy:
concurrency: build-daily-book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- uses: actions/cache@v3
with:
path: |
~/.deno
~/.cache/deno
key: ${{ runner.os }}-deno-${{ hashFiles('cli.ts') }}
- name: Get Yestoday Beijin Day
id: date
run: |
echo "::set-output name=yesterday::$(deno run cli.ts --yesterday --key)"
- run: make install
- name: Build yesterday book
id: build
run: make yesterdaymail
continue-on-error: true
env:
MJ_APIKEY_PUBLIC: ${{ secrets.MJ_APIKEY_PUBLIC }}
MJ_APIKEY_PRIVATE: ${{ secrets.MJ_APIKEY_PRIVATE }}
JOURNAL_PATH: ./blog
JOURNAL_URL: https://www.owenyoung.com/blog/journals/
- name: make release if build success
if: steps.build.outcome == 'success'
uses: "softprops/action-gh-release@v1"
env:
YESTERDAY:
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
tag_name: "daily-${{ steps.date.outputs.yesterday }}"
generate_release_notes: false
body: |
Visit [Online](https://clip-template.vercel.app/).
files: |
./dist/*/*.epub
./dist/*/*.zip