-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 1.03 KB
/
pages.yaml
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
name: Build and deploy Jekyl
on:
push:
jobs:
jekyll:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Use GitHub Actions' cache to shorten build times and decrease load on servers
- uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile') }}
restore-keys: |
${{ runner.os }}-gems-
# Standard usage
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
- name: Build with Jekyll
run: bundle exec jekyll build
env:
JEKYLL_ENV: production
- name: check
run: ls ./_site/
- name: Install SSH Key
if: ${{ github.ref == 'refs/heads/master' }}
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
- name: deploy
if: ${{ github.ref == 'refs/heads/master' }}
run: rsync -avz --quiet ./_site/ web@${{ secrets.SSH_HOST }}:/var/www/