blob: 5237dc749e4905c057de122aa36235625e0477be (
plain)
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
|
# .github/workflows/deploy.yml
name: Deploy
on:
push:
branches: [deploy]
env:
DEST: /home/public/1mb.club
SERVER: ssh.nyc1.nearlyfreespeech.net
BUNDLE_PATH: vendor/bundle
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
- name: SSH setup
run: |
mkdir -p ~/.ssh
echo "${{ secrets.NFS_ACCESS }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H -4 "$SERVER" >> ~/.ssh/known_hosts
- name: Build
run: bundle exec jekyll build
- name: Deploy
run: rsync -rltvz --delete -e "ssh -i ~/.ssh/id_ed25519" _site/ "${{ secrets.NFS_USER }}@$SERVER:$DEST/"
|