Note that the commit hooks guidance is out of date #120
Workflow file for this run
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 test | |
on: | |
pull_request: | |
workflow_call: | |
inputs: | |
upload-artifact: | |
default: false | |
required: false | |
type: boolean | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@09c10210cc6e998d842ce8433cd9d245933cd797 | |
with: | |
bundler-cache: true | |
- name: Set up Node | |
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 | |
with: | |
node-version: '12' | |
- name: Build and test | |
run: | | |
bundle exec middleman build | |
# Share data between the build and deploy jobs so we don't need to run `npm run build` again on deploy | |
# Upload the deploy folder as an artifact so it can be downloaded and used in the deploy job | |
- name: Upload artifact | |
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb | |
if: ${{ inputs.upload-artifact }} | |
with: | |
name: build | |
path: build/** | |
retention-days: 1 |