test gh pages with workflow #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Cypress report | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
cypress-generate-report: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cypress install | |
uses: cypress-io/github-action@v6 | |
with: | |
runTests: false | |
- name: Cypress run tests | |
run: npm run test:chrome | |
continue-on-error: true | |
- name: Merge test results into one | |
run: npm run report:merge | |
- name: Generate HTML report | |
run: npm run report:generate | |
# - name: Deploy report page | |
# uses: peaceiris/actions-gh-pages@v3.9.3 | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./public | |
# user_name: 'matottodigitas' | |
# user_email: 'matottodigitas@users.noreply.github.com' | |
- name: Upload report to Github | |
uses: actions/upload-artifact@v4 | |
with: | |
path: | | |
./public | |
cypress/screenshots/ | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |