Skip to content

Fix build

Fix build #34

Workflow file for this run

name: Build and deploy
on:
push:
branches:
- master
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Replace build number
run: sed -i "s/<BUILD_ID>/$(echo $GITHUB_SHA)/g" src/environments/environment.prod.ts
- name: Build
run: npm run build
# Copy index.html to 404.html to make sure that GitHub Pages will serve the app when a route is not found
- name: Copy index.html to 404.html
run: cp dist/browser/index.html dist/browser/404.html
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
path: dist/browser
deploy:
name: Deploy
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1