-
Notifications
You must be signed in to change notification settings - Fork 10
44 lines (33 loc) · 1.03 KB
/
deploy.yml
File metadata and controls
44 lines (33 loc) · 1.03 KB
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
name: Build and Deploy to trinity
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install dependencies
run: bundle install
- name: Build site
run: bundle exec jekyll build
- name: Set up SSH
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
- name: Add remote host to known_hosts
run: |
mkdir -p ~/.ssh
echo "trinity.hacklab.fi ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEbuUzPWSkuCC/iAE2KgxnCO22+9MLdTfTGLiVFOC6gm" >> ~/.ssh/known_hosts
- name: Deploy to server via rsync
run: |
rsync -rltz --delete --omit-dir-times _site/ hackfi@trinity.hacklab.fi:/var/www/hacklab.fi/