diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bcf8e983a..ffd6b9db4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,11 +22,18 @@ jobs: npm run abaplint npm run merge npm run merge.ci + - name: build-merged-build + run: ./ci/build-merged-build.sh - name: deploy-merged-build + uses: peaceiris/actions-gh-pages@v3 if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' - env: - GITHUB_API_KEY: ${{ secrets.MY_TOKEN }} - run: ./ci/deploy-merged-build.sh + with: + deploy_key: ${{ secrets.DEPLOY_ABAPGIT_BUILD }} + external_repository: abapGit/build + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + publish_branch: main + publish_dir: ../build - name: deploy-release-tag if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' env: diff --git a/ci/build-merged-build.sh b/ci/build-merged-build.sh new file mode 100755 index 000000000..1a1d2cb76 --- /dev/null +++ b/ci/build-merged-build.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Build merged +npm run merge || exit 1 +wc -l ./zabapgit.abap + +# Deploy artifacts +git clone https://github.com/abapGit/build.git ../build +cp zabapgit.abap ../build/zabapgit.abap +cd ../build \ No newline at end of file diff --git a/ci/deploy-merged-build.sh b/ci/deploy-merged-build.sh deleted file mode 100755 index f2cddc263..000000000 --- a/ci/deploy-merged-build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Build merged -npm run merge || exit 1 -wc -l ./zabapgit.abap - -# Deploy artifacts -git clone https://github.com/abapGit/build.git ../build -cp zabapgit.abap ../build/zabapgit.abap -cd ../build - -# Commit -git status -git config user.email "ci@abapgit.org" -git config user.name "CI" -git add zabapgit.abap -git commit -m "CI build $TRAVIS_BUILD_NUMBER" || exit 1 -git push -q https://$GITHUB_API_KEY@github.com/abapGit/build.git > /dev/null 2>&1