Skip to content

Jekyll Deploy

Jekyll Deploy #4439

Workflow file for this run

name: Jekyll Deploy
on:
schedule:
# run daily at 05:30
- cron: '30 5 * * *'
push:
branches:
- main
paths-ignore:
- 'Gemfile'
- 'README.md'
- 'LICENSE.md'
- 'SECURITY.md'
- 'npm.md'
# Build site using jekyll
jobs:
jekyll:
runs-on: ubuntu-latest
steps:
# checkout code
- uses: actions/checkout@v2
# Use ruby/setup-ruby to shorten build times
# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
# Install Node
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
# Install PostCSS plugins using jekyll-postcss-v2, package.json and postcss.config.js
- run: npm ci # run: npm run dev
# Update yaml config file with SECRETS!!
# path:
# to:
# the:
# - value: hello
# - value: world
# nested: |
# abc: 123
# e.g. propertyPath: 'path.to.the.0.value' = to change 'hello'
# e.g. propertyPath: 'path.to.the.1.value' = to change 'world'
# e.g. propertyPath: 'path.to.nested.abc' = to change '123'
- name: Update yaml values
uses: woodcox/yaml-update-action@master
with:
valueFile: '_config.yml'
propertyPath: 'jekyll_get_json.0.json'
value: 'https://cecleeds.churchsuite.co.uk/embed/calendar/json'
commitChange: false
updateFile: true
# use jekyll-action-ts to build
# https://github.com/limjh16/jekyll-action-ts
- name: Build site
uses: limjh16/jekyll-action-ts@v2
with:
enable_cache: true
# custom_opts: '--verbose --trace' #'--drafts --future'
## If you need to specify any Jekyll build options, enable the above input
## Flags accepted can be found here https://jekyllrb.com/docs/configuration/options/#build-command-options
env:
NODE_ENV: production # production or development - this affects minification of css in postcss.config.js
# https://github.com/peaceiris/actions-gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
# GITHUB_TOKEN secret is set up automatically
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
# deploy to host
#name: Publish Website
#on:
# workflow_run:
# workflows: ["deploy-jekyll"]
# types: [completed]
#jobs:
# on-success:
# ftp-deploy-action:
# runs-on: ubuntu-latest
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
# steps:
# - uses: actions/checkout@v2.1.0
# with:
# fetch-depth: 2
# - name: FTP-Deploy-Action
# uses: woodcox/FTP-Deploy-Action
# with:
# ftp-server: ftp://ftp.cecleeds.co.uk
# ftp-username: ${{ secrets.FTP_USER }}
# ftp-password: ${{ secrets.FTP_PASSWORD }}