Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save avivijay19/a80906e913a340f1e3951b245b85fa9e to your computer and use it in GitHub Desktop.
Save avivijay19/a80906e913a340f1e3951b245b85fa9e to your computer and use it in GitHub Desktop.
name: CD
on: [push, pull_request]
jobs:
cd:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup
uses: actions/setup-node@v2
with:
node-version: lts/*
cache: "npm"
- name: Install
run: npm ci
- name: Build
run: npm run build:ci
- name: Test
run: npm run test:ci
- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: npx semantic-release
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.2.5
with:
repository-name: openmf/openmf.github.io
branch: gh-pages
folder: dist/ngx-toggle-example
target-folder: ngx-toggle
token: ${{ secrets.GH_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment