change deploy build setup (#4711)

* change deploy build setup

* +x
This commit is contained in:
Lars Hvam 2021-04-19 17:12:11 +02:00 committed by GitHub
parent f264f33b7e
commit 3afc2fa1b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 21 deletions

View File

@ -22,11 +22,18 @@ jobs:
npm run abaplint npm run abaplint
npm run merge npm run merge
npm run merge.ci npm run merge.ci
- name: build-merged-build
run: ./ci/build-merged-build.sh
- name: deploy-merged-build - name: deploy-merged-build
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit'
env: with:
GITHUB_API_KEY: ${{ secrets.MY_TOKEN }} deploy_key: ${{ secrets.DEPLOY_ABAPGIT_BUILD }}
run: ./ci/deploy-merged-build.sh 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 - name: deploy-release-tag
if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit' if: github.ref == 'refs/heads/main' && github.repository == 'abapGit/abapGit'
env: env:

10
ci/build-merged-build.sh Executable file
View File

@ -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

View File

@ -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