fix benchmarks publication process
@@ -35,17 +35,23 @@ jobs:
- name: Set env
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF:10}
- name: Run benchmarks
+ id: run_benchmarks
uses: artipie/benchmarks@master
with:
aws-access-key: '${{ secrets.PERF_AWS_ACCESS_KEY }}'
aws-secret-key: '${{ secrets.PERF_AWS_SECRET_KEY }}'
- adapter: 'files'
- scenario: 'upload-files.jmx'
version: '${{ env.RELEASE_VERSION }}'
- - name: Publish reports
- uses: JamesIves/github-pages-deploy-action@releases/v3
+ - name: Commit benchmark results
+ run: |
+ export REPORT=${{ steps.run_benchmarks.outputs.report }}
+ export VERSION=${{ env.RELEASE_VERSION }}
+ git checkout gh-pages
+ mkdir -p benchmarks/$VERSION
+ mv $REPORT benchmarks/$VERSION/$REPORT
+ git add benchmarks/$VERSION/$REPORT
+ git commit -m "Add benchmark results"
+ - name: Push benchmark results
+ uses: ad-m/github-push-action@master
with:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- BRANCH: gh-pages
- FOLDER: report
- TARGET_FOLDER: benchmarks/${{ env.RELEASE_VERSION }}/files/upload
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ branch: gh-pages
