-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (38 loc) · 1.34 KB
/
discord-fonts.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
name: Process and Upload Fonts
on:
push:
branches:
- staging
- main
paths:
- '**.css'
jobs:
process-fonts:
environment: ${{ github.ref_name == 'main' && 'production' || 'staging' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install required tools
run: sudo apt-get update && sudo apt-get install -y zsh perl curl
- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_KEYFILE }}'
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'
- name: Process Font URLs
run: |
chmod +x ./process-fonts.sh
CLIENT_ID=${{ github.ref_name == 'main' && '1199271093882589195' || '1199270539278164008' }}
DISCORD_ACTIVITY_CLIENT_ID=$CLIENT_ID \
./process-fonts.sh --no-prompt --output-dir ${{ runner.temp }}/sheet-fonts
- name: Upload to GCS
run: |
ENV_PATH="${{ github.ref_name == 'main' && 'production' || 'staging' }}"
# Sync the entire fonts directory
gcloud storage rsync \
--project=roll20-actual \
${{ runner.temp }}/sheet-fonts \
"gs://roll20-cdn/roll20-beacon-sheets/fonts/$ENV_PATH" \
--recursive \
--cache-control="no-cache"