Build Site #950
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 Site | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 10 * * *' # 5AM EST | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RUBY_YJIT_ENABLE: "1" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.2' | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Cache multiple paths | |
uses: actions/cache@v3 | |
with: | |
path: .cache | |
key: cache-for-http-responses | |
- name: Install minify | |
uses: jaxxstorm/[email protected] | |
with: # Grab the latest version | |
repo: tdewolff/minify | |
tag: v2.12.4 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
- name: Build docs | |
run: bundle exec rake build | |
env: | |
OPENWEATHER_API_KEY: ${{ secrets.OPENWEATHER_API_KEY }} | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 945954ae6af55e6e4af004fb7772fdc5 | |
projectName: followthesnow | |
directory: docs | |
# Optional: Enable this if you want to have GitHub Deployments triggered | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |