-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
82 lines (80 loc) · 2.26 KB
/
config.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
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
77
78
79
80
81
82
version: 2.1
orbs:
gradle: circleci/[email protected]
workflows:
default:
jobs:
- build-styles
- deploy:
requires:
- build-styles
filters:
branches:
only:
- gh-pages
jobs:
build-styles:
docker:
- image: cimg/node:17.1.0
resource_class: small
steps:
- checkout
- run:
name: "Pull Submodules"
command: |
git submodule init
git submodule update
- run:
name: "Install Dependencies"
command: npm install
- run:
name: "Setup Artifacts Folder"
command: |
mkdir ~/working
- run:
name: "Copy Glyphs"
command: |
cp -r ./font-glyphs/* ~/working/
- run:
name: "Generate sprites"
command: |
./tools/generate_sprite_sheets
- run:
name: "Add Files"
command: |
cp sprites*.json ~/working/
cp sprites*.png ~/working/
cp style.json ~/working/
cp map.html ~/working/
- run:
name: "Packing Artifact"
command: |
mkdir ~/artifacts
cd ~/working
tar cfvz ~/artifacts/styles.tar.gz .
- persist_to_workspace:
root: ~/artifacts
paths:
- styles.tar.gz
deploy:
docker:
- image: cimg/base:2021.11
resource_class: small
steps:
- attach_workspace:
at: ~/artifacts
- add_ssh_keys:
fingerprints:
- "5e:b9:08:4e:01:f0:71:3c:74:0c:d9:10:3b:6d:74:de"
- run:
name: "SSH Upload"
command: |
sudo ssh-keyscan -H maps.tuerantuer.org >> known_hosts
scp -o UserKnownHostsFile=known_hosts ~/artifacts/styles.tar.gz [email protected]:/var/www/styles/entitlementcard-styles.tar.gz
ssh -o UserKnownHostsFile=known_hosts [email protected] \<<SSH
rm -rf /var/www/styles/entitlementcard
mkdir -p /var/www/styles/entitlementcard
cd /var/www/styles/entitlementcard
tar xfv /var/www/styles/entitlementcard-styles.tar.gz
rm /var/www/styles/entitlementcard-styles.tar.gz
SSH