Skip to content

Commit

Permalink
Config for middleman (flexera-public#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncastro1990 authored Apr 15, 2024
1 parent c9450e0 commit b8cf712
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- main
permissions:
contents: write
pages: write
env:
# HOME required by Setup Git and Setup Go Steps
HOME: ${{ github.workspace }}
Expand Down Expand Up @@ -97,12 +98,18 @@ jobs:
gem update --system 3.2.3
echo "Pull Request: $TRAVIS_PULL_REQUEST"
# Ensure the site builds, otherwise fail the build on PRs
if [[ $CI_NODE_INDEX = "build" && $TRAVIS_PULL_REQUEST != 'false' ]]; then bundle exec rake download_policy_list; bundle exec middleman build; fi
if [[ $CI_NODE_INDEX = "build" ]]; then bundle exec rake download_policy_list; bundle exec middleman build; fi
# Ensure the links work, otherwise fail the build on PRs (only on PRs)
if [[ $CI_NODE_INDEX = "check_links" && $TRAVIS_PULL_REQUEST != 'false' ]]; then echo "TODO Fix check_links to throttle itself properly"; fi
# Only deploy the site live if the master branch is updated (not during pull-requests)
# Currently, deploy first builds by default
if [[ $CI_NODE_INDEX = "build" && $TRAVIS_PULL_REQUEST == 'false' ]]; then bundle exec rake download_policy_list; bundle exec middleman deploy; fi
env:
CI_NODE_INDEX: ${{ matrix.index }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Github Pages
if: ${{env.CI_NODE_INDEX == 'build' && github.ref == 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
env:
CI_NODE_INDEX: ${{ matrix.index }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ def image(link, title, alt_text)

# rsync, ftp, sftp, or git
deploy.method = :git

end

page "/release-feed.xml", :layout => false
Expand Down

0 comments on commit b8cf712

Please sign in to comment.