-
-
Notifications
You must be signed in to change notification settings - Fork 2
30 lines (29 loc) · 1.1 KB
/
deployment.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
name: Deployment
on: [workflow_dispatch]
jobs:
deployment:
runs-on: ubuntu-latest
environment: krcg.org
steps:
- uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Build static files
run: krcg-static build
- name: Setup SSH key
run: |
mkdir /home/runner/.ssh
echo "${{ secrets.KRCG_DEPLOY_KEY }}" > /home/runner/.ssh/id_rsa
chmod 600 /home/runner/.ssh/id_rsa
echo "${{ secrets.KRCG_GRA_HOST_ID }}" > /home/runner/.ssh/known_hosts
echo "${{ secrets.KRCG_SBG_HOST_ID }}" >> /home/runner/.ssh/known_hosts
- name: Deploy files to krcg-gra
run: rsync -rlptq --delete-after -e ssh build/ [email protected]:projects/static.krcg.org/dist
- name: Deploy files to krcg-sbg
run: rsync -rlptq --delete-after -e ssh build/ [email protected]:projects/static.krcg.org/dist