Build site and deploy to gh-pages branch #1623
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: Build site and deploy to gh-pages branch | |
on: | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * *' # Run build every day at 00:00 UTC every day for future-dated articles | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v1 | |
- name: Set up Ruby 2.6 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.6.0 | |
- name: Install Ruby dependencies | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Build and deploy to gh-pages branch | |
run: | | |
chmod 750 deployment-script.sh | |
./deployment-script.sh | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
JEKYLL_ENV: production |