-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (42 loc) · 1.24 KB
/
deploy.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
name: Deployment
concurrency: live
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
environment: live
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.1'
- name: Setup Tooling
run: |
sudo apt-get update -y
sudo apt-get install -y webp exiftool pngcrush gzip brotli
- name: Build
run: |
bundle install
bundle exec jekyll build
bundle exec rake
- name: Tailscale
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
tags: tag:ci
- name: Copy To Production
run: |
mkdir -p ~/.ssh
echo "vcsjones2024-dev ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKK5Bi4tOamAsNJpQpmk3bBwDN0hEB8dHTaeOdtJN6OU" >> ~/.ssh/known_hosts
rsync -a --delete _site/ deployer@vcsjones2024-dev:/var/wwwroot/vcsjones.dev
rsync --ignore-times _server/Caddyfile deployer@vcsjones2024-dev:/etc/caddy/Caddyfile
ssh deployer@vcsjones2024-dev 'sudo systemctl reload caddy.service'