From 0cc9026978886736010601c8e692352edf3b587a Mon Sep 17 00:00:00 2001 From: ISSOtm Date: Tue, 15 Sep 2020 15:57:20 +0200 Subject: [PATCH] Fix docs update action Make script executable (facepalm) Fix `run**s**-on` typo Add key using ssh-agent Force using SSH for pushing back --- .github/actions/get-pages.sh | 0 .github/workflows/update-master-docs.yml | 11 +++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) mode change 100644 => 100755 .github/actions/get-pages.sh diff --git a/.github/actions/get-pages.sh b/.github/actions/get-pages.sh old mode 100644 new mode 100755 diff --git a/.github/workflows/update-master-docs.yml b/.github/workflows/update-master-docs.yml index c5378556..f526f13e 100644 --- a/.github/workflows/update-master-docs.yml +++ b/.github/workflows/update-master-docs.yml @@ -16,7 +16,7 @@ on: jobs: build: - run-on: ubuntu-18.04 + runs-on: ubuntu-18.04 steps: - name: Checkout rgbds@master uses: actions/checkout@v2 @@ -44,8 +44,15 @@ jobs: mkdir -p -m 700 ~/.ssh echo "${{ secrets.SSH_KEY_SECRET }}" > ~/.ssh/id_ed25519 chmod 0600 ~/.ssh/id_ed25519 + eval $(ssh-agent -s) + ssh-add ~/.ssh/id_ed25519 git config --global user.name "GitHub Action" git config --global user.email "community@gbdev.io" git add . git commit -m "Update RGBDS master documentation" - git push + if git remote | grep -q origin; then + git remote set-url origin git@github.com:gbdev/rgbds-www.git + else + git remote add origin git@github.com:gbdev/rgbds-www.git + fi + git push origin master