Skip to content

Commit

Permalink
chore: migrate ci/cd pipelines to github actions and argo cd
Browse files Browse the repository at this point in the history
  • Loading branch information
Prasanna Chiang committed Jan 2, 2024
1 parent 52a5ac5 commit a8ea03f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: ci

on:
push:
branches:
- '**'
tags:
- '**'
workflow_dispatch:

jobs:
cancel:
runs-on: quid-runner
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.1
with:
all_but_latest: true

test-and-deploy:
runs-on: frontend-ci-high-memory-runner
steps:
- name: Checkout Master
uses: actions/checkout@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
fetch-depth: 50

- name: Checkout Non-Master
uses: actions/checkout@v4
if: ${{ github.ref != 'refs/heads/master' }}

- name: Install Yarn
run: |
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.17.3
echo "$HOME/.yarn/bin" >> $GITHUB_PATH
- uses: actions/setup-node@v4
with:
node-version: 11.10.1

- name: Type Checks and Unit Tests
run: |
flow check
react-app-rewired test --coverage --colorsyarn --frozen-lockfile && yarn build
- name: Build
run: yarn build

- name: Publish gh-pages
if: ${{ github.ref == 'refs/heads/master' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./styleguide
keep_files: true
user_name: 'quid-bot'
user_email: 'infratructure@quid.com'
cname: ui.quid.com

- name: Publish to npm
if: ${{ github.ref == 'refs/heads/master' }}
run: |
export GITHUB_NAME=quid-bot
export GITHUB_EMAIL=infratructure@quid.com
export AUTOMATED_WRITE_AUTH=${{ secrets.AUTOMATED_WRITE_AUTH }}
scripts/deploy.sh
File renamed without changes.

0 comments on commit a8ea03f

Please sign in to comment.