diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6e5198510..eeef751331 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -280,7 +280,7 @@ jobs: - name: Deploy to `npm` branch run: npm run gitpublish:npm env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} deploy-to-deno-branch: name: Deploy to `deno` branch @@ -316,4 +316,4 @@ jobs: - name: Deploy to `deno` branch run: npm run gitpublish:deno env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/resources/gitpublish.sh b/resources/gitpublish.sh index 2485143478..bf27acdc1f 100755 --- a/resources/gitpublish.sh +++ b/resources/gitpublish.sh @@ -23,11 +23,15 @@ if [ -z "${DIST_DIR}" ]; then exit 1; fi; -if [ -z "${GH_TOKEN}" ]; then - echo 'Must provide GH_TOKEN as environment variable!' +if [ -z "${GITHUB_TOKEN}" ]; then + echo 'Must provide GITHUB_TOKEN as environment variable!' exit 1; fi; +if [ -z "${GITHUB_ACTOR}" ]; then + echo 'Must provide GITHUB_ACTOR as environment variable!' +fi; + if [ ! -d $DIST_DIR ]; then echo "Directory '${DIST_DIR}' does not exist!" exit 1; @@ -35,7 +39,7 @@ 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_ACTOR}:${GITHUB_TOKEN}@github.com/graphql/graphql-js.git" $BRANCH # Remove existing files first rm -rf $BRANCH/**/*