Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ jobs:
run: npm run gitpublish:npm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ACTOR: ${{ env.GITHUB_ACTOR }}

deploy-to-deno-branch:
name: Deploy to `deno` branch
Expand Down Expand Up @@ -317,3 +318,4 @@ jobs:
run: npm run gitpublish:deno
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ACTOR: ${{ env.GITHUB_ACTOR }}
8 changes: 7 additions & 1 deletion resources/gitpublish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,20 @@ if [ -z "${GH_TOKEN}" ]; then
exit 1;
fi;

if [ -z "${GH_ACTOR}" ]; then
GITHUB_CREDENTIALS="${GH_TOKEN}";
else
GITHUB_CREDENTIALS="${GH_ACTOR}:${GH_TOKEN}";
fi;

if [ ! -d $DIST_DIR ]; then
echo "Directory '${DIST_DIR}' does not exist!"
exit 1;
fi;

# Create empty directory
rm -rf $BRANCH
git clone -b $BRANCH -- "https://${GITHUB_ACTOR}:${GH_TOKEN}@github.com/graphql/graphql-js.git" $BRANCH
git clone -b $BRANCH -- "https://${GITHUB_CREDENTIALS}@github.com/graphql/graphql-js.git" $BRANCH

# Remove existing files first
rm -rf $BRANCH/**/*
Expand Down