chore: move getting started app to *.scion.vercel.app
subdomain
#85
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
name: Continuous Delivery | |
on: | |
push: | |
branches: | |
- master-angular | |
- 'issue/master-angular/**' | |
workflow_dispatch: | |
env: | |
NODE_VERSION: 20.14.0 | |
jobs: | |
install: | |
name: 'Installing NPM modules' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: 'Caching NPM modules if necessary' | |
uses: actions/cache@v4 | |
id: node-modules-cache | |
with: | |
path: ./node_modules | |
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- if: steps.node-modules-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
build-apps: | |
name: 'Building Apps' | |
needs: install | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
app: | |
- name: host-app | |
cmd: npm run host-app:build:vercel | |
- name: products-app | |
cmd: npm run products-app:build:vercel | |
- name: customers-app | |
cmd: npm run customers-app:build:vercel | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- name: 'Restoring NPM modules from cache' | |
uses: actions/cache@v4 | |
with: | |
path: ./node_modules | |
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- run: ${{ matrix.app.cmd }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.app.name }} | |
path: dist/${{ matrix.app.name }} | |
deploy-apps: | |
name: 'Deploying Apps' | |
if: github.ref == 'refs/heads/master-angular' | |
needs: [build-apps] | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Downloading host-app' | |
uses: actions/download-artifact@v4 | |
with: | |
name: host-app | |
path: dist/host-app | |
- name: 'Downloading products-app' | |
uses: actions/download-artifact@v4 | |
with: | |
name: products-app | |
path: dist/products-app | |
- name: 'Downloading customers-app' | |
uses: actions/download-artifact@v4 | |
with: | |
name: customers-app | |
path: dist/customers-app | |
- name: 'Deploying host-app to Vercel' | |
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/vercel-deploy@master | |
with: | |
dist-folder: dist/host-app/browser | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
org-id: ${{ secrets.VERCEL_ORG_ID }} | |
project-id: ${{ secrets.VERCEL_MICROFRONTEND_PLATFORM_GETTING_STARTED_APP_PROJECT_ID }} | |
aliases: microfrontend-platform-getting-started-angular.scion.vercel.app | |
- name: 'Deploying products-app to Vercel' | |
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/vercel-deploy@master | |
with: | |
dist-folder: dist/products-app/browser | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
org-id: ${{ secrets.VERCEL_ORG_ID }} | |
project-id: ${{ secrets.VERCEL_MICROFRONTEND_PLATFORM_GETTING_STARTED_APP_PROJECT_ID }} | |
aliases: microfrontend-platform-getting-started-products-angular.scion.vercel.app | |
- name: 'Deploying customers-app to Vercel' | |
uses: SchweizerischeBundesbahnen/scion-toolkit/.github/actions/vercel-deploy@master | |
with: | |
dist-folder: dist/customers-app/browser | |
vercel-token: ${{ secrets.VERCEL_TOKEN }} | |
org-id: ${{ secrets.VERCEL_ORG_ID }} | |
project-id: ${{ secrets.VERCEL_MICROFRONTEND_PLATFORM_GETTING_STARTED_APP_PROJECT_ID }} | |
aliases: microfrontend-platform-getting-started-customers-angular.scion.vercel.app |