chore(deps): bump the npm_and_yarn group across 1 directory with 3 updates #98
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
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
| name: Default Pipeline | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build and Deploy | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "npm" | |
| - run: | | |
| npm ci | |
| npm run build --if-present | |
| npm audit | |
| npm run lint | |
| npm test | |
| npm run testFE | |
| mkdir ./build | |
| cp index.html ./build | |
| cp index.css ./build | |
| cp -rf node_modules ./build | |
| cp -rf frontend ./build | |
| cp -rf backend ./build | |
| cp -rf .nojekyll ./build | |
| rm -rf backend/config.js | |
| - name: Init new repo in dist folder and commit generated files | |
| run: | | |
| cd ./build | |
| git init | |
| git add -A | |
| git config --local user.email "action@github.com" | |
| git config --local user.name "GitHub Action" | |
| git config --global --add safe.directory /github/workspace | |
| git commit -m 'deploy' | |
| - name: Force push to destination branch | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| force: true | |
| directory: ./build |