-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 1.08 KB
/
prod.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
name: deploy to prod
on:
release:
types: [created]
# Copied from staging.yml.
# GitHub does not support sharing steps between workflows yet.
jobs:
deployment-prod:
runs-on: ubuntu-latest
env:
CI: false
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y make rsync git apt-transport-https ca-certificates curl gnupg-agent software-properties-common
- uses: actions/checkout@v2
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
name: id_rsa-bastion
known_hosts: ${{ secrets.KNOWN_HOSTS }}
config: |
Host covidcalc
User root
Hostname covidcalc.org
IdentityFile ~/.ssh/id_rsa-bastion
- name: Install and Build 🔧
env:
CI: false
PUBLIC_URL: /
run: |
npm install
npm run build
scp -i ~/.ssh/id_rsa-bastion -o StrictHostKeyChecking=no -r build/* [email protected]:/var/www/html