Repository navigation
66 lines (54 loc) · 1.96 KB
/
Copy path_build-docs.yml
File metadata and controls
66 lines (54 loc) · 1.96 KB
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
66
name: Build-Docs
on:
workflow_call:
defaults:
run:
shell: bash -l {0}
jobs:
BuildDocs:
name: Build Docs
runs-on: macos-26
timeout-minutes: 20
permissions:
statuses: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set GIT_TAG
id: extract_git_tag
run: |
if [[ $GITHUB_REF == "refs/tags/"* ]]
then
echo ::set-output name=GIT_TAG::${GITHUB_REF#refs/tags/}
else
echo ::set-output name=GIT_TAG::""
fi
- name: Print tag
run: echo ${STEPS_EXTRACT_GIT_TAG_OUTPUTS_GIT_TAG}
env:
STEPS_EXTRACT_GIT_TAG_OUTPUTS_GIT_TAG: ${{ steps.extract_git_tag.outputs.GIT_TAG }}
- name: Set up node and ruby
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47 # v4.0.1
- name: Cache Bundler install Gems
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ env.ImageVersion }}-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-${{ env.ImageVersion }}
- name: Bundle Install
run: bundle install --jobs 4 --retry 3
- name: Setup iOS toolchain
uses: $/.github/actions/ios-setup
- name: Install sourcekitten
run: brew install sourcekitten
- name: Build and verify docs (main)
if: steps.extract_git_tag.outputs.GIT_TAG == '' && github.ref == 'refs/heads/main'
run: ./scripts/build-docs pr_docs && rm -rf docs
- name: Build and verify docs (pull request build)
if: steps.extract_git_tag.outputs.GIT_TAG == '' && github.ref != 'refs/heads/main'
run: ./scripts/build-docs $PR_VERSION
env:
PR_VERSION: ${{ github.event.pull_request.number }}