Skip to content

Commit 1be6393

Browse files
committed
Fixed bundle install and refactored commit message
1 parent 9b4972f commit 1be6393

File tree

3 files changed

+20
-15
lines changed

3 files changed

+20
-15
lines changed

.github/workflows/deploy.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
JEKYLL_ENV: production
1010
MIQ_ENV: production
1111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12-
PAYLOAD_REF: ${{ github.event.client_payload.ref }}
12+
PAYLOAD_REF_NAME: ${{ github.event.client_payload.ref_name }}
1313
PAYLOAD_SHA: ${{ github.event.client_payload.sha }}
1414
PAYLOAD_REPOSITORY: ${{ github.event.client_payload.repository }}
1515
PAYLOAD_PR_NUMBER: ${{ github.event.client_payload.pr_number }}
@@ -23,8 +23,9 @@ jobs:
2323
- name: Get manageiq.org repo
2424
run: git clone https://github.com/ManageIQ/manageiq.org
2525
- name: Build
26-
run: cd manageiq.org && exe/miq build all
27-
- name: Set COMMIT_MESSAGE
28-
run: create_commit_message.rb >> $GITHUB_ENV
26+
run: |
27+
cd manageiq.org
28+
bundle install
29+
exe/miq build all
2930
- name: Deploy
3031
run: deploy.sh

create_commit_message.rb

Lines changed: 0 additions & 10 deletions
This file was deleted.

deploy.sh

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,19 @@ git config --global user.email "[email protected]"
1212
git clone --bare --branch master --depth 5 https://x-access-token:${GITHUB_TOKEN}@github.com/ManageIQ/manageiq.github.io .git
1313
git config core.bare false
1414
git add -A
15-
git commit -m "${COMMIT_MESSAGE}"
15+
16+
commit_message=$(
17+
ruby << RUBY
18+
message =
19+
if ENV["PAYLOAD_PR_NUMBER"].to_s =~ /^(\d+)$/
20+
"#{ENV["PAYLOAD_REPOSITORY"]}##{\$1}"
21+
else
22+
"#{ENV["PAYLOAD_REPOSITORY"]}@#{ENV["PAYLOAD_SHA"]} (#{ENV["PAYLOAD_REF_NAME"]})"
23+
end
24+
25+
puts message
26+
RUBY
27+
)
28+
29+
git commit -m "Deploy for ${commit_message}"
1630
git push origin master

0 commit comments

Comments
 (0)