-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (37 loc) · 1.35 KB
/
update.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
name: Update to Deploy Repository
run-name: Update to Deploy Repository (${{ github.ref_name }})
on:
push:
branches:
- master
- develop
concurrency:
group: update-${{ github.ref_name }}
cancel-in-progress: true
jobs:
update-deploy:
runs-on: ubuntu-latest
steps:
- name: Set up Git
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- name: Set up Github SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_GITHUB_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Checkout code
run: |
git clone --branch ${{ github.ref_name }} --recursive git@github.com:kmu-wink/wink-official-deploy.git deploy
- name: Update Submodule
run: |
cd deploy
git submodule update --remote frontend
- name: Commit and Push
run: |
cd deploy
git add frontend
git commit -m "update: frontend"
git push -f origin ${{ github.ref_name }}