Skip to content

Build

Build #29

Workflow file for this run

name: Build
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Set build image var
run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV
- name: Checkout GH Pages
uses: actions/checkout@v2
with:
repository: CocoaPods/cdn-staging.cocoapods.org
branch: gh-pages
path: _pages
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v2
with:
path: vendor/bundle
key: gems@v1-${{ runner.os }}-${{ env.ImageVersion }}-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
gems@v1-${{ runner.os }}-${{ env.ImageVersion }}-
- name: Bundler
run: |
bundle config path vendor/bundle
bundle install --jobs=4
- name: Update index
run: |
bundle exec ruby Scripts/update-index.rb --sha "${{ inputs.sha }}"
# - name: Deploy to Pages
# if: github.event_name == 'schedule'
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./_specs/_site
# cname: cdn-staging.cocoapods.org
# force_orphan: true
# user_name: CocoaPodsBot
# user_email: [email protected]
# - name: Tell Honeybadger.io
# if: github.event_name == 'schedule'
# env:
# HONEYBADGER_TOKEN: ${{ secrets.HONEYBADGER_TOKEN }}
# run: |
# curl https://api.honeybadger.io/v1/check_in/${HONEYBADGER_TOKEN}
# - uses: actions/upload-artifact@v2
# if: github.event_name != 'schedule'
# with:
# name: site
# path: ./_specs/_site/*
on:
workflow_dispatch:
inputs:
sha:
description: 'Spec repo commit SHA'
required: true
type: string
# repository_dispatch:
# types:
# - cronjob
# - trunk-webhook
# schedule:
# - cron: '* * * * *' # max frequency specified because the actual frequency is determined by GH Actions rate limit
# branches:
# - main