Publish website #152
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: Publish website | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: 0 0 * * 1 | |
jobs: | |
generate: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@main | |
with: | |
ref: gh-pages | |
- name: Set up git | |
uses: Homebrew/actions/git-user-config@master | |
- name: Set up tap (+ dependency taps) | |
run: | | |
brew tap davidchall/hep | |
- name: Generate formulae data | |
run: brew ruby script/generate.rb | |
- name: Push changes | |
run: | | |
git add _data/formula{,_canonical.json} formula | |
if ! git diff --no-patch --exit-code HEAD -- _data/formula{,_canonical.json} formula; then | |
git commit -m "Update formulae data" _data/formula{,_canonical.json} formula | |
fi | |
git push |