Skip to content

Commit a27c57f

Browse files
authored
Do not include vendor/bundle in GHA built PRs (#75)
* Only run CI when `docs/src` changed https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore * Include language in PR title * Ignore GHA generated Ruby files The PRs generated by the GHA have some 400,000+ lines changed in them #71. That is because it 2,000+ files installed including all the gems installed and Ruby. This is definitively not what we want. This behavior is documented in https://github.com/ruby/setup-ruby/tree/v1/?tab=readme-ov-file#bundle-config that it will place the files in `vendor/bundle`. To exclude the directory, we can add it to our `.gitignore`.
1 parent 46ed97a commit a27c57f

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

.github/workflows/rundoc-ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
pull_request:
44
branches:
55
- main
6+
paths:
7+
- "docs/src/**"
8+
- ".rundoc-workspace/**"
69
jobs:
710
test-rundoc:
811
runs-on: ubuntu-latest

.github/workflows/rundoc-pr.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ jobs:
1010
runs-on: pub-hk-ubuntu-24.04-ip
1111
env:
1212
BUNDLE_GEMFILE: .rundoc-workspace/Gemfile
13-
strategy:
14-
matrix:
15-
lang: ["ruby", "dotnet", "nodejs", "python", "php", "go", "java_maven", "java_gradle", "scala"]
16-
fail-fast: false
1713
steps:
1814
- name: Get token for GH application (Linguist)
1915
uses: actions/create-github-app-token@v1
@@ -33,19 +29,22 @@ jobs:
3329
bundler-cache: true # do run 'bundle install' and cache
3430
- uses: buildpacks/github-actions/[email protected]
3531

36-
# [CONFIG] add different languages set up here
37-
- run: |
38-
bundle exec rundoc docs/src/${{ matrix.lang }}/RUNDOC.md \
39-
--on-success-dir docs/${{ matrix.lang }} \
40-
--on-failure-dir docs/fail/${{ matrix.lang }} \
41-
--force
32+
- name: Run rundoc for all languages
33+
run: |
34+
langs=("ruby" "dotnet" "nodejs" "python" "php" "go" "java_maven" "java_gradle" "scala")
35+
for lang in "${langs[@]}"; do
36+
bundle exec rundoc docs/src/$lang/RUNDOC.md \
37+
--on-success-dir docs/$lang \
38+
--on-failure-dir docs/fail/$lang \
39+
--force
40+
done
4241
continue-on-error: true
4342
- name: Create Pull Request
4443
id: pr
4544
uses: peter-evans/create-pull-request@v7
4645
with:
4746
token: ${{ steps.generate-token.outputs.token }}
48-
branch: rundoc-update-${{ matrix.lang }}
47+
branch: rundoc-update
4948
delete-branch: true
5049
base: main
5150
commit-message: Update tutorials

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.DS_Store
22

33
.rundoc-workspace/
4+
5+
# Ignore GHA generated Ruby files
6+
# https://github.com/ruby/setup-ruby/tree/v1/?tab=readme-ov-file#bundle-config
7+
vendor/bundle

0 commit comments

Comments
 (0)