Skip to content

Move to a new server. #19

Move to a new server.

Move to a new server. #19

Workflow file for this run

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.com
rsync --ignore-times _server/Caddyfile deployer@vcsjones2024-dev:/etc/caddy/Caddyfile
ssh deployer@vcsjones2024-dev 'sudo systemctl reload caddy.service'