chore(deps): update actions/checkout action to v4 (#31) #57
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: Documentation | |
on: | |
release: | |
types: [ published ] | |
push: | |
branches: [ main ] | |
jobs: | |
deploy_docs: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Cache gems | |
uses: actions/cache@v3 | |
with: | |
path: vendor/bundle | |
key: ${{ runner.os }}-flow-${{ hashFiles('**/Gemfile.lock') }} | |
restore-keys: | | |
${{ runner.os }}-flow | |
- name: Bundle install | |
run: | | |
bundle config path vendor/bundle | |
bundle install --jobs 4 --retry 3 | |
- name: Generate Documentation | |
run: | | |
bundle exec jazzy --config .jazzy.yml | |
- name: Fix Invalid URLs | |
run: | | |
cd docs | |
touch .nojekyll | |
- name: Commit files | |
run: | | |
cd docs | |
git init | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git add . | |
git commit -m "Deploying Updated Jazzy Docs" | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
directory: docs | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
force: true |