[CHORE]: polished readme ready to make repository public (#105) #135
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: 🚀 Deploy | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: {} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
lint: | |
name: ⬣ ESLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: 🔬 Lint | |
run: npm run lint | |
typecheck: | |
name: ʦ TypeScript | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: 🔎 Type check | |
run: npm run typecheck --if-present | |
test: | |
name: ⚡ Jest Testing | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: ⚡ Run Jest Testing | |
run: npm run test -- --coverage | |
cypress: | |
name: ⚫️ Cypress | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: 🏄 Copy test env vars | |
run: cp .env.example .env | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: 🏗 Build | |
run: npm run build | |
- name: 🌳 Cypress run | |
uses: cypress-io/[email protected] | |
with: | |
start: npm run dev | |
wait-on: "http://localhost:8811" | |
browser: chrome | |
env: | |
PORT: "8811" | |
deploy: | |
needs: [lint, typecheck, test] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛑 Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: ⬇️ Checkout repo | |
uses: actions/checkout@v3 | |
- name: ⎔ Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: 👀 Env | |
run: | | |
echo "Event name: ${{ github.event_name }}" | |
echo "Git ref: ${{ github.ref }}" | |
echo "GH actor: ${{ github.actor }}" | |
echo "SHA: ${{ github.sha }}" | |
VER=`node --version`; echo "Node ver: $VER" | |
VER=`npm --version`; echo "npm ver: $VER" | |
- name: 📥 Download deps | |
uses: bahmutov/npm-install@v1 | |
- name: 🏗 Build | |
run: npm run build | |
- name: 🛠 Install Arc | |
run: npm i -g @architect/architect | |
- name: 🚀 Staging Deploy | |
if: github.ref == 'refs/heads/develop' | |
run: arc deploy --staging --prune | |
env: | |
CI: true | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: 🚀 Production Deploy | |
if: github.ref == 'refs/heads/master' | |
run: arc deploy --production --prune | |
env: | |
CI: true | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |