CD #922
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: CD | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: 0 5 * * * | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
path: _site | |
- name: Install dependencies | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.5 | |
bundler-cache: true | |
- name: Wipe output directory | |
run: rm -rfv _site/* | |
- name: Build site | |
run: bundle exec jekyll b | |
env: | |
GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }} | |
- name: Push site | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add -A . && | |
git commit -m "Built from $GITHUB_SHA." && | |
[[ -r CNAME && -r index.html ]] && git push | |
working-directory: _site |