Merge pull request #923 from remap-keys/feature/workbench-audio-drive… #444
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: Deploy for Production | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - 'src/assets/files/build-info.json' | |
| jobs: | |
| deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [20.x] | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| token: ${{ secrets.INCREMENT_VALUE_PAT }} | |
| - name: Increment value | |
| uses: yoichiro/gh-action-increment-value@v5 | |
| with: | |
| target_directory: 'src/assets/files' | |
| target_file: 'build-info.json' | |
| prefix: '{ "buildNumber": ' | |
| suffix: ' }' | |
| commit_message: 'Increment the build number to ' | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build and Test | |
| env: | |
| REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }} | |
| REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }} | |
| REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }} | |
| REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }} | |
| REACT_APP_FIREBASE_MESSAGE_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGE_SENDER_ID }} | |
| REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }} | |
| REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }} | |
| REACT_APP_ERROR_REPORTING_KEY: ${{ secrets.REACT_APP_ERROR_REPORTING_KEY }} | |
| REACT_APP_PAYPAL_CLIENT_ID: ${{ secrets.REACT_APP_PAYPAL_CLIENT_ID }} | |
| REACT_APP_PAYPAL_ENVIRONMENT: ${{ secrets.REACT_APP_PAYPAL_ENVIRONMENT }} | |
| run: npm run build && npm test | |
| - name: Deploy to Firebase | |
| uses: w9jds/firebase-action@v13.5.2 | |
| with: | |
| args: deploy | |
| env: | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN_PRODUCTION }} | |
| PROJECT_ID: remap-b2d08 |