chore(demo, components-angular): Upgrade to Angular 16 (#1920) #101
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
### | |
# | |
# Release the demo app whenever it's package json changes on the main branch | |
# | |
### | |
name: Release Demo App to Netlify | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/demo/package.json' | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
release: | |
name: Release demo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check if version has changed | |
id: check # This will be the reference for getting the outputs. | |
uses: EndBug/version-check@v2 # You can choose the version/branch you prefer. | |
with: | |
file-name: ./packages/demo/package.json | |
diff-search: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup | |
if: steps.check.outputs.changed == 'true' | |
uses: swisspost/design-system/.github/actions/setup-pnpm@main | |
# Install changesets locally | |
- name: Install demo app & dependencies | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm --filter "design-system-demo..." install | |
# Build the demo app and it's dependencies | |
- name: Build demo app & dependencies | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm --filter "design-system-demo..." build | |
- name: Install netlify cli | |
if: steps.check.outputs.changed == 'true' | |
run: pnpm -g i netlify-cli@15 | |
# Publish demo only if changesets published any packages | |
- name: Publish demo app to netlify | |
id: netlify | |
if: steps.check.outputs.changed == 'true' | |
env: | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
run: | | |
netlify link --id $NETLIFY_SITE_ID | |
netlify deploy --build false --dir packages/demo/dist/demo --prod |