diff --git a/.github/workflows/cucumber.yml b/.github/workflows/cucumber.yml index 009e233..9ed8f80 100644 --- a/.github/workflows/cucumber.yml +++ b/.github/workflows/cucumber.yml @@ -32,11 +32,23 @@ jobs: - name: List report directory contents (debugging) run: ls -R build/allure/commandline/plugins/behaviors-plugin/ + - name: Verify report directory existence (debugging) + run: | + if [ -d build/reports/allure-report/allureReport ]; then + echo "Report directory exists." + else + echo "Report directory does not exist." + exit 1 + fi + + - name: Move report to unique directory + run: mv build/reports/allure-report/allureReport/ build/reports/allure-report/${{ github.run_id }} + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: name: github-pages - path: build/reports/allure-report/allureReport/ + path: build/reports/allure-report/${{ github.run_id }} deploy: runs-on: ubuntu-latest @@ -47,7 +59,37 @@ jobs: contents: read steps: - - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v4 + - name: Checkout repository + uses: actions/checkout@v3 with: - token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + ref: gh-pages + + - name: Copy report to gh-pages + run: | + mkdir -p reports/${{ github.run_id }} + cp -r ${{ github.workspace }}/build/reports/allure-report/${{ github.run_id }}/* reports/${{ github.run_id }}/ + + - name: Update index.html + run: | + REPORT_LINK="reports/${{ github.run_id }}/index.html" + echo "