Skip to content

[EGON-57]: VH, TD: Renaming of Domain to IconSet #130

[EGON-57]: VH, TD: Renaming of Domain to IconSet

[EGON-57]: VH, TD: Renaming of Domain to IconSet #130

Workflow file for this run

name: Continuous integration
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
deploy_prod:
description: "Deploy v2 prod"
required: true
type: boolean
jobs:
dependencies:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- name: Install latest updates
run: npm ci
- name: Save cache
uses: actions/cache/save@v4
with:
path: |
node_modules
key: node_modules-${{ github.run_id }}
test:
runs-on: ubuntu-latest
needs: dependencies
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- run: npm run test
format:
runs-on: ubuntu-latest
needs: dependencies
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- run: npm run format:check
build:
runs-on: ubuntu-latest
needs: [ test, format ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- run: npm run build
- name: Cache build
uses: actions/cache/save@v4
with:
path: |
dist_build
key: build-${{ github.sha }}-${{ github.run_id }}
upload-artifact:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- name: Load build cache
uses: actions/cache/restore@v4
with:
path: |
dist_build
key: build-${{ github.sha }}-${{ github.run_id }}
- run: npm run zip
- uses: actions/upload-artifact@v4
with:
name: domain-story-modeler
path: |
dist/*.zip
README.md
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
deploy-website-latest:
if: inputs.deploy_prod == false
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- run: |
sed -i -E "s/version:\s'[0-9]+\.[0-9]+\.[0-9]+'/version: '${{ github.sha }}'/" src/environments/environment.prod.ts
sed -i -E "s/\"version\":\s\"[0-9]+\.[0-9]+\.[0-9]+\"/\"version\": \"${{ github.sha }}\"/" package.json
# Rebuilding with new config
npm run build
CLONE_DIR=$(mktemp -d)
git config --global user.email "development@egon.io"
git config --global user.name "Egon.io Bot"
git clone --single-branch --branch main "https://x-access-token:${{ secrets.EGON_IO_DEPLOYMENT_PAT }}@github.com/WPS/egon.io-website.git" "${CLONE_DIR}"
rm -r "${CLONE_DIR}/app-latest-build"
mkdir "${CLONE_DIR}/app-latest-build"
cp -r dist_build/egon/* "${CLONE_DIR}/app-latest-build"
cd "${CLONE_DIR}"
git add .
git commit -m "Deploy latest build" || true
git push || true
deploy-website-prod:
if: inputs.deploy_prod == true
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- run: |
npm run build
CLONE_DIR=$(mktemp -d)
git config --global user.email "development@egon.io"
git config --global user.name "Egon.io Bot"
git clone --single-branch --branch main "https://x-access-token:${{ secrets.EGON_IO_DEPLOYMENT_PAT }}@github.com/WPS/egon.io-website.git" "${CLONE_DIR}"
rm -r "${CLONE_DIR}/app-v2"
mkdir "${CLONE_DIR}/app-v2"
cp -r dist_build/egon/* "${CLONE_DIR}/app-v2"
cd "${CLONE_DIR}"
git add .
git commit -m "Deploy production build" || true
git push || true
publish-image:
runs-on: ubuntu-latest
needs: [ build ]
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup_environment
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/wps/egon.io:latest