Last active
February 22, 2022 19:58
-
-
Save bobbyg603/8d4df4c5651b9a757c0be102dc638e1e to your computer and use it in GitHub Desktop.
GitHub Actions Continuous Integration Workflow for Angular Apps and Libraries
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
# 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