Skip to content

Commit

Permalink
Try generating with github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
NotWoods committed Apr 20, 2023
1 parent e6d55d7 commit 4735ff4
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Generate files

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.32

- name: Generate SVG and Markdown
run: deno run --allow-net=api.notion.com --allow-env=NOTION_TOKEN,NOTION_DB --allow-read --allow-write .\src\generate.ts
env:
NOTION_DB: 1043e8edb9094976af12a59f25e41286
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}

- name: Generate PNG
uses: docker://minidocks/inkscape:1
with:
args: >-
--export-type="png"
tea.svg
- name: Generate eBook
uses: docker://pandoc/core:3.0
with:
args: >-
tea-list.txt
-o tea.epub
--epub-title-page=false
- name: Upload generated artifacts
uses: actions/upload-artifact@v3
with:
name: book
path: |
tea.epub
tea.png

0 comments on commit 4735ff4

Please sign in to comment.