Skip to content

Commit 3ded89e

Browse files
committed
review changes
1 parent f04bd97 commit 3ded89e

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,7 @@ jobs:
280280
- name: Deploy to `npm` branch
281281
run: npm run gitpublish:npm
282282
env:
283-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
284-
GH_ACTOR: ${{ env.GITHUB_ACTOR }}
283+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
285284

286285
deploy-to-deno-branch:
287286
name: Deploy to `deno` branch
@@ -317,5 +316,4 @@ jobs:
317316
- name: Deploy to `deno` branch
318317
run: npm run gitpublish:deno
319318
env:
320-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
321-
GH_ACTOR: ${{ env.GITHUB_ACTOR }}
319+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

resources/gitpublish.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ if [ -z "${DIST_DIR}" ]; then
2323
exit 1;
2424
fi;
2525

26-
if [ -z "${GH_TOKEN}" ]; then
27-
echo 'Must provide GH_TOKEN as environment variable!'
26+
if [ -z "${GITHUB_TOKEN}" ]; then
27+
echo 'Must provide GITHUB_TOKEN as environment variable!'
2828
exit 1;
2929
fi;
3030

31-
if [ -z "${GH_ACTOR}" ]; then
32-
GITHUB_CREDENTIALS="${GH_TOKEN}";
33-
else
34-
GITHUB_CREDENTIALS="${GH_ACTOR}:${GH_TOKEN}";
31+
if [ -z "${GITHUB_ACTOR}" ]; then
32+
echo 'Must provide GITHUB_ACTOR as environment variable!'
3533
fi;
3634

3735
if [ ! -d $DIST_DIR ]; then
@@ -41,7 +39,7 @@ fi;
4139

4240
# Create empty directory
4341
rm -rf $BRANCH
44-
git clone -b $BRANCH -- "https://${GITHUB_CREDENTIALS}@github.com/graphql/graphql-js.git" $BRANCH
42+
git clone -b $BRANCH -- "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/graphql/graphql-js.git" $BRANCH
4543

4644
# Remove existing files first
4745
rm -rf $BRANCH/**/*

0 commit comments

Comments
 (0)