Merge pull request #113 from Shopify/add-minitest-hooks #109
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: Deploy GitHub page | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
generate_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.0 | |
- name: Install Cue | |
uses: cue-lang/setup-cue@v1.0.0 | |
with: | |
version: 'v0.7.0' | |
- name: Install bundler and gems | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Generate dist & docs | |
run: make | |
- name: Upload data | |
uses: actions/upload-artifact@v4 | |
with: | |
name: data | |
path: docs/_data | |
build: | |
runs-on: ubuntu-latest | |
needs: generate_docs | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download data | |
uses: actions/download-artifact@v4 | |
with: | |
name: data | |
path: docs/_data | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
- name: Build with Jekyll | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: docs | |
destination: _site | |
- name: Copy search indexes | |
run: sudo bin/copy_docs_search_indexes | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |