2024 announce (#284) #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Jekyll Build and Deploy | |
on: | |
push: | |
branches: ["main"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.3" | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Build site | |
run: bundle exec jekyll build | |
- uses: actions/cache@v4 | |
id: build-cache | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
needs: [build] | |
environment: | |
name: production | |
url: https://ournetworks.ca | |
steps: | |
- uses: actions/cache@v4 | |
id: build-cache | |
with: | |
path: ./* | |
key: ${{ github.sha }} | |
- name: Rsync Deployment | |
uses: Burnett01/[email protected] | |
with: | |
switches: -avzrO --delete --no-p | |
path: _site/ | |
remote_path: /var/www/html | |
remote_host: ournetworks.ca | |
remote_user: ${{ secrets.DEPLOY_USER }} | |
remote_key: ${{ secrets.DEPLOY_KEY }} |