Merge pull request #483 from thostetler/small-fix-to-github-action-2 #3
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 and Deploy to Github Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
# Checkout action v4 doesn't seem to be working with fetch-depth: 0, so we use v3, and a big fetch-depth | |
# See https://github.com/actions/checkout/issues/520, https://stackoverflow.com/a/6802238 | |
# this is so that last-modified-at plugin can use the git history to determine the last modified date | |
fetch-depth: 2147483647 | |
# Use GitHub Actions' cache to cache dependencies on servers | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
.asdf/** | |
vendor/bundle | |
key: ${{ runner.os }}-cache-${{ hashFiles('**/cache.key') }} | |
restore-keys: | | |
${{ runner.os }}-cache- | |
# Use GitHub Deploy Action to build and deploy to Github | |
- uses: jeffreytse/[email protected] | |
if: ${{ !env.ACT }} | |
with: | |
provider: 'github' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: 'gh-pages' | |
jekyll_src: './' | |
jekyll_cfg: '_config.yml' |