I can’t explain this way, so I’ll write it down here.
How can I simplify this file?

# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CIon:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-lateststrategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Building step
env: # as an environment variable
REACT_APP_RUNNING_AT: ${{ secrets.REACT_APP_RUNNING_AT }}
REACT_APP_FACEBOOK_APP_ID: ${{ secrets.REACT_APP_FACEBOOK_APP_ID }}
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
........ more envs
run: |
npm ci
npm run build
# - name: Deploy on gh-pages 🚀
# uses: JamesIves/github-pages-deploy-action@3.5.9
# with:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# BRANCH: gh-pages # The branch the action should deploy to.
# FOLDER: .next # The folder the action should deploy.
- name: Deploying on Firebase 🚀
env: # as an environment variable
FIREBASE_PROJECT_ALIAS: ${{ secrets.FIREBASE_PROJECT_ALIAS }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
## Envs for the application
REACT_APP_RUNNING_AT: ${{ secrets.REACT_APP_RUNNING_AT }}
REACT_APP_FACEBOOK_APP_ID: ${{ secrets.REACT_APP_FACEBOOK_APP_ID }}
...... more envs
run: |
npm i -g firebase-tools
npm run deploy

Software Engineer | Tech Writer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store