Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config for middleman #16

Merged
merged 11 commits into from
Apr 15, 2024
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
Loading