Build site and deploy to gh-pages branch #2113
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 | |
# Run build every day at 00:00 UTC every day for future-dated articles | |
schedule: | |
- cron: '0 0 * * *' | |
permissions: | |
contents: write | |
pages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v1 | |
- name: Set up Ruby 3.0 | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.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 |