Merge pull request #699 from 7474/copilot/update-build-steps-for-windows #434
This file contains hidden or 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: DeployToGitHubPages | |
| env: | |
| PUBLISH_DIR: SRC.Sharp/SRCTestBlazor/bin/Release/net6.0/publish/wwwroot | |
| # Controls when the action will run | |
| on: | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - .github/workflows/CD-pages.yml | |
| - SRC.Sharp/** | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Publish app | |
| run: dotnet publish SRC.Sharp/SRCTestBlazor/SRCTestBlazor.csproj -c Release | |
| - name: Configure for GitHub Pages | |
| run: mv -f ${{ env.PUBLISH_DIR }}/index.ghp.html ${{ env.PUBLISH_DIR }}/index.html | |
| - name: Rewrite base href | |
| uses: SteveSandersonMS/ghaction-rewrite-base-href@v1 | |
| with: | |
| html_path: ${{ env.PUBLISH_DIR }}/index.html | |
| base_href: /SRC/ | |
| - name: GitHub Pages | |
| if: success() | |
| uses: crazy-max/ghaction-github-pages@v4.2.0 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: ${{ env.PUBLISH_DIR }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| e2e: | |
| runs-on: ubuntu-latest | |
| needs: publish | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - run: npm ci | |
| working-directory: ./SRC.Sharp/SRCTestBlazor/E2E | |
| - name: Percy Test Cypress run | |
| uses: percy/exec-action@v0.3.1 | |
| with: | |
| working-directory: ./SRC.Sharp/SRCTestBlazor/E2E | |
| command: 'cypress run --record' | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CYPRESS_BASE_URL: https://7474.github.io/SRC |