Skip to content

Commit d326a34

Browse files
committed
bugfix: use context ref directly if not pr
1 parent d9e0dc8 commit d326a34

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9296,7 +9296,7 @@ exports.requiredEnvVars = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'GITHUB
92969296
exports.default = (bucketName, uploadDirectory, environmentPrefix) => __awaiter(void 0, void 0, void 0, function* () {
92979297
const websiteUrl = `https://s3.amazonaws.com/${bucketName}/index.html`;
92989298
const { repo } = github.context;
9299-
const branchName = github.context.payload.pull_request.head.ref;
9299+
const branchName = github.context.ref;
93009300
validateEnvVars_1.default(exports.requiredEnvVars);
93019301
const bucketExists = yield checkBucketExists_1.default(bucketName);
93029302
if (!bucketExists) {

src/actions/uploadAction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const requiredEnvVars = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'G
1414
export default async (bucketName: string, uploadDirectory: string, environmentPrefix: string) => {
1515
const websiteUrl = `https://s3.amazonaws.com/${bucketName}/index.html`
1616
const { repo } = github.context
17-
const branchName = github.context.payload.pull_request!.head.ref
17+
const branchName = github.context.ref
1818

1919
validateEnvVars(requiredEnvVars)
2020

0 commit comments

Comments
 (0)