-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (44 loc) · 1.15 KB
/
publish.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
40
41
42
43
44
45
46
47
48
49
50
51
name: Pages Publish
on:
push:
branches:
- main
repository_dispatch:
types: rss-data-updated
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -yqq git build-essential
- name: Setup ruby
run: |
gem install bundler -v 2.5.6
bundle install --jobs 4 --retry 3
- name: Generate site
run: |
bundle exec jekyll build
- name: Deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
- name: Setup SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
name: id_rsa
known_hosts: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
- name: Update Deployment
run: |
ssh [email protected] \
-o IdentitiesOnly=yes \
-C "cd sites/smartlogic.io && git pull origin gh-pages"