Skip to content

sentrylab build sync and reload. #1247

sentrylab build sync and reload.

sentrylab build sync and reload. #1247

Workflow file for this run

name: sentrylab build sync and reload.
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 15 * * *'
jobs:
build:
runs-on: ubuntu-latest
env:
LSI: 'true'
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- name: cache Ruby Bundler
id: cache
uses: actions/cache@v2
env:
CACHE_ID: 2
with:
path: vendor/bundle
key: ${{ runner.os }}-bundler-${{ env.CACHE_ID }}-${{ hashFiles('Gemfile') }}
restore-keys: |
${{ runner.os }}-bundler-${{ env.CACHE_ID }}-
- name: Change rubygems loading
run: sed -i "/^source/c source 'https://rubygems.org'" Gemfile
- name: install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
gem update --system 3.2.3
bundle config set --local path 'vendor/bundle'
bundle install --jobs=4 --retry=3
- name: setup commit hash string
run: |
commitString=$(git rev-list HEAD --abbrev-commit --max-count=1)
echo "commitString: $commitString" >> _config.yml
- name: run jekyll-build
run: |
bundle config set --local path 'vendor/bundle'
bundle exec jekyll build --trace
- name: simple deploy with git
uses: JamesIves/github-pages-deploy-action@v4
with:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
BASE_BRANCH: 'main'
BRANCH: 'gh-pages'
FOLDER: '_site'
commit-message: '<auto generate>:🚀page build/deploy by github action.'
auto_commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check for changes
id: check_changes
run: |
/bin/bash scripts/snippets.sh
- name: Commit changes
run: |
if git diff --exit-code; then exit 0; else git config user.name github-actions
git config user.email github-actions@github.com
git add README.md
git commit -m "<Actions>:🚀 Push file while $web_version changed"
git push; fi