From fbef1dc7bc225e1b03a23b21ca5f213c2a0bfed5 Mon Sep 17 00:00:00 2001 From: Ronny Wegener Date: Sat, 18 Jan 2020 19:14:59 +0100 Subject: [PATCH] [github-actions] removed hakuneko personal access token --- .github/workflows/continuous-deployment.yml | 1 - deploy-web.js | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/continuous-deployment.yml b/.github/workflows/continuous-deployment.yml index c016355d536..153069db0ca 100644 --- a/.github/workflows/continuous-deployment.yml +++ b/.github/workflows/continuous-deployment.yml @@ -33,7 +33,6 @@ jobs: - name: Deploy (web) env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - HAKUNEKO_TOKEN: ${{ secrets.HAKUNEKO_ACCESS_TOKEN }} HAKUNEKO_PASSPHRASE: ${{ secrets.HAKUNEKO_PASSPHRASE }} # set variable with branch that triggered the action (e.g. GITHUB_BRANCH = ${{ github.ref }}) run: npm run deploy:web \ No newline at end of file diff --git a/deploy-web.js b/deploy-web.js index 8466343ead9..6f167468915 100644 --- a/deploy-web.js +++ b/deploy-web.js @@ -62,8 +62,7 @@ async function sslPack(archive, meta) { async function gitCommit() { let user = process.env.GITHUB_ACTOR; let mail = user + '@users.noreply.github.com'; - let token = process.env.HAKUNEKO_TOKEN || process.env.GITHUB_TOKEN; - let auth = Buffer.from('x-access-token:' + token).toString('base64'); + let auth = Buffer.from('x-access-token:' + process.env.GITHUB_TOKEN).toString('base64'); await execute(`git add ${config.directory}/*`); await execute(`git -c user.name="${user}" -c user.email="${mail}" commit -m 'Deployed Release: ${config.directory}'`); await execute(`git -c http.extraheader="AUTHORIZATION: Basic ${auth}" push origin HEAD:${config.branch}`); @@ -73,7 +72,7 @@ async function gitCommit() { // - https://github.community/t5/GitHub-Actions/Github-action-not-triggering-gh-pages-upon-push/td-p/26869 // - https://github.com/peaceiris/actions-gh-pages/issues/9 let uri = `https://api.github.com/repos/manga-download/hakuneko/pages/builds`; - await execute(`curl -L -X POST -H "Content-Type: application/json" -H "Authorization: TOKEN ${process.env.HAKUNEKO_TOKEN}" ${uri}`) + await execute(`curl -L -X POST -H "Content-Type: application/json" -H "Authorization: TOKEN ${process.env.GITHUB_TOKEN}" ${uri}`) } async function main() {