Skip to content

Commit

Permalink
Build and deploy website on push only
Browse files Browse the repository at this point in the history
  • Loading branch information
pitmonticone committed Sep 26, 2024
1 parent c55035f commit 563c8bd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/blueprint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,26 @@ jobs:
find home_page/docs -name "*.hash" -delete
- name: Bundle dependencies
if: github.event_name == 'push'
uses: ruby/setup-ruby@v1
with:
working-directory: home_page
ruby-version: "3.0" # Specify Ruby version
bundler-cache: true # Enable caching for bundler

- name: Build website using Jekyll
if: env.HOME_PAGE_EXISTS == 'true'
if: github.event_name == 'push' && env.HOME_PAGE_EXISTS == 'true'
working-directory: home_page
run: JEKYLL_ENV=production bundle exec jekyll build # Note this will also copy the blueprint and API doc into home_page/_site

- name: "Upload website (API documentation, blueprint and any home page)"
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.HOME_PAGE_EXISTS == 'true' && 'home_page/_site' || 'home_page/' }}

- name: Deploy to GitHub Pages
if: github.event_name == 'push'
id: deployment
uses: actions/deploy-pages@v4

Expand Down

0 comments on commit 563c8bd

Please sign in to comment.