Skip to content

Disable angular analytics #68

Disable angular analytics

Disable angular analytics #68

name: Build main
on:
push:
branches: ["main"]
jobs:
build-dist:
runs-on: ubuntu-22.04
strategy:
matrix:
node-version: [21.x]
steps:
- uses: actions/checkout@v4
- uses: jessehouwing/actions-semver-checker@v1
with:
check-minor-version: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Lint
run: npm run lint
# TODO ci: find a way to configure URL at runtime
- name: Build
run: |
npm run build -- --configuration=production --base-href=/european-geo-information/
- name: Store dist folder
uses: actions/upload-artifact@v4
with:
name: dist_folder
path: ./dist/european-geo-information/browser
deploy-gh-pages:
needs: build-dist
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
contents: read
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Download dist
uses: actions/download-artifact@v4
with:
name: dist_folder
path: ./dist
- name: Fix permissions
run: |
chmod -c -R +rX "dist/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
build-docker-image:
runs-on: ubuntu-22.04
needs: build-dist
steps:
- uses: actions/checkout@v4
- name: Download dist
uses: actions/download-artifact@v4
with:
name: dist_folder
path: ./dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
tags: holgerstolzenberg/european-geo-information:latest
platforms: linux/amd64,linux/arm64
push: true
sbom: true
provenance: true
build-args: |
"dist_base=./dist"