-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (37 loc) · 1.3 KB
/
build-pages-and-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
name: Build and deploy website
run-name: ${{ github.repository }} is built and deployed
on:
push:
branches:
- main
schedule:
- cron: "0 22 1,15 * *"
workflow_dispatch:
jobs:
Jekyll:
name: Build Jekyll site and deploy it to the web server
runs-on: ubuntu-latest
steps:
- run: echo "Branch is ${{ github.ref }} in repository ${{ github.repository }} is built and deployed."
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup Ruby environment
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true
cache-version: 0
- name: Build website with Jekyll
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --strict_front_matter
env:
JEKYLL_ENV: production
JEKYLL_LOG_LEVEL: warn
- name: Copy the files to the server using rsync
uses: burnett01/[email protected]
with:
switches: -avxP --delete --exclude="/invoice" --exclude="/invoice-usermeeting" --exclude="/qgisuser"
path: _site/*
remote_path: /var/www/sites/qgisch
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.SSH_PRIVATE_KEY }}