-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (60 loc) · 1.75 KB
/
check-push.yaml
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
57
58
59
60
61
62
name: Check on push
on:
push:
paths:
- '**.glyphs'
- 'sources/*'
- 'scripts/*'
- 'Makefile'
- 'requirements.txt'
- '.github/workflows/*'
jobs:
check-push:
runs-on: ubuntu-latest
steps:
- name: "Check out repository"
uses: actions/checkout@v2
- name: "Set up Python 3.8"
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: "Set up dependencies"
run: |
sudo apt-get update
sudo apt-get install ttfautohint
sudo snap install yq
- name: "Cache dependencies"
uses: actions/cache@v2
with:
path: ./venv/
key: ${{ runner.os }}-venv-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-venv-
- name: "Set up zip file for outputs"
id: zip-name
shell: bash
run: echo "ZIP_NAME=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')-fonts" >> $GITHUB_ENV
- name: "Build fonts"
run: make build
- name: "Generate Font Bakery report"
run: make test
continue-on-error: true
- name: "Generate font proofs"
run: make proof
- name: "Generate proof site"
run: cp scripts/index.html out/index.html
- name: "Deploy site via GitHub Pages"
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
- name: "Upload zip as action artifact"
uses: actions/upload-artifact@v2
with:
name: ${{ env.ZIP_NAME }}
path: |
fonts
out
outputs:
zip_name: ${{ env.ZIP_NAME }}