-
Notifications
You must be signed in to change notification settings - Fork 4
67 lines (62 loc) · 1.8 KB
/
Build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
fail-fast: false
steps:
- name: Set build image var
run: echo "ImageVersion=$ImageVersion" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Checkout Specs
uses: actions/checkout@v4
with:
repository: CocoaPods/Specs
path: _specs
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- uses: actions/cache@v4
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: Build indices
run: |
Scripts/build.sh
- 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.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@v4
if: github.event_name != 'schedule'
with:
name: site
path: ./_specs/_site/*
on:
push:
repository_dispatch:
types:
- cronjob
schedule:
- cron: '*/5 * * * *'