Skip to content

Instantly share code, notes, and snippets.

@bobbyg603
Last active February 22, 2022 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobbyg603/8d4df4c5651b9a757c0be102dc638e1e to your computer and use it in GitHub Desktop.
Save bobbyg603/8d4df4c5651b9a757c0be102dc638e1e to your computer and use it in GitHub Desktop.
GitHub Actions Continuous Integration Workflow for Angular Apps and Libraries
# Based on https://github.com/actions/starter-workflows/blob/main/ci/node.js.yml
name: CD
on:
push:
branches:
- main
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: bobbyg603/bobbyg603.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