-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (32 loc) · 1.02 KB
/
deploy.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
name: Deploy to prod
# Controls when the workflow will run
on:
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: dev
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_KEY_PRIVATE }}
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Copy
run: |
git clone [email protected]:bayesgroup/bayesgroup.org.git prod
rm -rf prod/*
cp -R dev/* prod/
echo 'bayesgroup.org' > prod/CNAME
- name: Deploy
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions Runner"
cd prod
git add *
git commit -a -m "`(cd ../dev; git log -1 --pretty=%B)`" -m "- from dev@`(cd ../dev; git rev-parse HEAD)`"
git push