-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (38 loc) · 1.15 KB
/
pdf.yml
File metadata and controls
43 lines (38 loc) · 1.15 KB
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
name: pdf
on:
push:
branches: [main]
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
# Engine and version to use, see the syntax in the README. Reads from .ruby-version if unset.
ruby-version: 2.6.5
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Install PDF utility
run: npm install mdpdf -g
- name: Create PDF
run: bin/pdfify
- name: Commit files
run: |
if [ ! -z "$(git status --porcelain)" ]; then
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add --all .
git commit -m "Regenerate syllabus.pdf"
fi
- name: Push changes
uses: ad-m/github-push-action@fe38f0a751bf9149f0270cc1fe20bf9156854365
env:
GITHUB_ACTOR: "jules2689"
with:
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
branch: ${{ github.ref }}