-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (35 loc) · 1.12 KB
/
designers.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
name: Deploy Designers List
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Build
run: yarn && yarn designers
- name: Push
run: |
mkdir -p "$HOME/.ssh"
echo "${{ secrets.SSH_GITHUB_DEPLOY_KEY }}" > "$HOME/.ssh/id_rsa"
touch "$HOME/.ssh/known_hosts"
chmod 700 "$HOME/.ssh"
chmod 600 "$HOME/.ssh/id_rsa"
chmod 600 "$HOME/.ssh/known_hosts"
ssh-keyscan -t rsa github.com >> "$HOME/.ssh/known_hosts"
eval $(ssh-agent -s)
ssh-add "$HOME/.ssh/id_rsa"
git config --global user.email "[email protected]"
git config --global user.name "ActionsBot"
mkdir dist
cp designers.json dist/designers.json
cd dist
git init
git add designers.json
git commit -m "Deploying ${GITHUB_SHA}"
git remote add origin [email protected]:${GITHUB_REPOSITORY}.git
git remote -v
git push origin HEAD:designers --force