-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (74 loc) · 2.51 KB
/
build-init.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build, Init
on: [push]
jobs:
build-init:
if: "contains(github.event.head_commit.message, 'Initial commit')"
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: "Import GPG key for signing"
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.BOT_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
continue-on-error: true
- name: "Add .init.stamp file"
run: make .init.stamp
- name: "Commit files"
uses: stefanzweifel/git-auto-commit-action@v4
with:
file_pattern: .init.stamp README.md requirements.txt OFL.txt
commit_message: "chore(init): personalize repo"
commit_user_name: wcys-bot
commit_user_email: [email protected]
commit_author: wcys-bot <[email protected]>
- 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
user_name: 'wcys-bot[bot]'
user_email: '[email protected]'
- 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 }}