Skip to content

Commit

Permalink
fix(CI): Refactor to use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zak-cloudnc authored and maxime1992 committed Nov 21, 2021
1 parent a34e01b commit 8122faa
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 59 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# GitHub Actions docs
# https://help.github.com/en/articles/about-github-actions
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: CI

on: [push]

jobs:
build:

# Machine environment:
# https://help.github.com/en/articles/software-in-virtual-environments-for-github-actions#ubuntu-1804-lts
# We specify the Node.js version manually below, and use versioned Chrome from Puppeteer.
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v1
- name: Use Node.js 12.8
uses: actions/setup-node@v1
with:
node-version: 12.8
- name: Install dependencies
run: yarn --frozen-lockfile --non-interactive --no-progress
# - name: Lint Demo
# run: yarn demo:lint:check
# - name: Format check
# run: yarn prettier:check
# - name: Check Readme
# run: yarn readme:check
# - name: Test
# run: yarn lib:test:ci
- name: Build Lib
run: yarn lib:build:prod:view-engine
- name: Cypress run
uses: cypress-io/github-action@v2
with:
start: yarn demo:start --port 4765
browser: chrome
- name: Copy built README into dist
run: rm dist/ngx-observable-lifecycle/README.md && cp README.md dist/ngx-observable-lifecycle
- name: Copy LICENSE into dist
run: cp LICENSE dist/ngx-observable-lifecycle
- name: Build Demo
run: yarn run demo:build:prod --progress=false --base-href "https://cloudnc.github.io/ngx-sub-form/"
- name: Deploy
if: contains('refs/heads/master', github.ref)
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/ngx-sub-form-demo
- name: Release
if: contains('refs/heads/master refs/heads/next refs/heads/feat-rewrite', github.ref)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
58 changes: 0 additions & 58 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ From creating a small custom input, to breaking down a form into multiple sub co
It also works particularly well with polymorphic data structures.

[![npm version](https://badge.fury.io/js/ngx-sub-form.svg)](https://www.npmjs.com/package/ngx-sub-form)
[![Build Status](https://travis-ci.org/cloudnc/ngx-sub-form.svg?branch=master)](https://travis-ci.org/cloudnc/ngx-sub-form)
[![Build Status](https://github.com/cloudnc/ngx-sub-form/workflows/CI/badge.svg)](https://github.com/cloudnc/ngx-sub-form/actions)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](https://commitizen.github.io/cz-cli/)

## Blog post
Expand Down

0 comments on commit 8122faa

Please sign in to comment.