chore(deps): update crazy-max/ghaction-github-pages action to v4 #2970
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: Frontend | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: npm install --prefix frontend | |
- name: Run the tests and generate coverage report | |
run: npm test --prefix frontend -- --coverage | |
- name: Build | |
run: npm run build --prefix frontend | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Deploy - Github Pages | |
if: github.event_name == 'push' | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
build_dir: frontend/build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |