-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (35 loc) · 1.24 KB
/
deploy-staging.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
name: Push DJ Land to Staging
on:
push:
branches:
- staging-test
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 10
- name: Setup SSH Agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.CPANEL_SSH_KEY_DJLAND }}
- name: setup known hosts
run: |
mkdir -p ~/.ssh
touch ~/.ssh/known_hosts
- name: append to known hosts
run: |
echo "citr.ca ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDlfGEr5vyxI3pjywlMKtWXlP/8O2roklfib8JhgQp7z" > ~/.ssh/known_hosts
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "webops-github-action"
# - name: setup Remote Repo
# run: |
# git config pull.rebase false
# git remote add staging [email protected]:~/stage.citr.ca/citr-discorder-website
- name: checkout and pull staging in remote
run: |
ssh [email protected] -t 'cd ~/stage.djland.citr.ca; git fetch; git branch -v; git checkout staging-test; git pull origin staging-test; git branch -v'