Fix demo build #30
This file contains hidden or 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: Deploy demo page | |
on: | |
push: | |
branches: | |
- demo | |
jobs: | |
deploy-demo: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/[email protected] | |
- name: Cache node modules 💽 | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies 🔧 | |
run: | | |
npm ci | |
npm install -g @angular/cli | |
- name: Build application demo version 💪 | |
run: | | |
ng build --configuration=demo --localize | |
# create an index.html file for the demo redirecting to the english version | |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=/en/index.html"></head></html>' > dist-demo/browser/index.html | |
# copy 404 error page | |
cp src/404.demo.html dist-demo/browser/404.html | |
- name: Deploy demo application 🚀 | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: dist-demo/browser |