chore: Update font-family and remove unnecessary CSS in Component.vue… #42
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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
lint: | |
name: ✨ Lint | |
runs-on: ubuntu-latest | |
container: node:20-bullseye | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
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 }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- run: npm ci | |
- run: npm run lint | |
prepare: | |
name: 🔨 Initialisieren | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.version.outputs.prop }} | |
commit: ${{ steps.set-commit.outputs.commit }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: get version | |
id: version | |
uses: notiz-dev/[email protected] | |
with: | |
path: 'package.json' | |
prop_path: 'version' | |
- name: set commit | |
id: set-commit | |
run: echo "commit=${GITHUB_SHA:0:7}" >> $GITHUB_OUTPUT | |
# build and upload docker image to github container registry | |
build-client: | |
name: 🏗️ Build-client | |
needs: prepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Private actions checkout | |
uses: daspn/private-actions-checkout@v2 | |
with: | |
actions_list: '["codeanker/actions@master"]' | |
checkout_base_path: ./.github | |
app_id: ${{ secrets.APP_ID }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: codeanker/thesis-signage-app-frontend | |
flavor: suffix= | |
tags: type=sha,prefix= | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: set mode staging | |
if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/release/') | |
run: echo 'MODE=staging' >> "$GITHUB_ENV" | |
- name: set mode production | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') | |
run: echo 'MODE=production' >> "$GITHUB_ENV" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
target: frontend-production-stage | |
build-args: | | |
commitHash=${{needs.prepare.outputs.commit}} | |
version=${{needs.prepare.outputs.version}} | |
mode=${{ env.MODE }} | |
build-api: | |
name: 🏗️ Build-api | |
needs: prepare | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Private actions checkout | |
uses: daspn/private-actions-checkout@v2 | |
with: | |
actions_list: '["codeanker/actions@master"]' | |
checkout_base_path: ./.github | |
app_id: ${{ secrets.APP_ID }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Docker meta | |
id: docker_meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: codeanker/thesis-signage-app-api | |
flavor: suffix= | |
tags: type=sha,prefix= | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: set mode staging | |
if: github.ref != 'refs/heads/master' && !startsWith(github.ref, 'refs/heads/release/') | |
run: echo 'MODE=staging' >> "$GITHUB_ENV" | |
- name: set mode production | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release/') | |
run: echo 'MODE=production' >> "$GITHUB_ENV" | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ${{ steps.docker_meta.outputs.tags }} | |
labels: ${{ steps.docker_meta.outputs.labels }} | |
target: api-production-stage | |
build-args: | | |
commitHash=${{needs.prepare.outputs.commit}} | |
version=${{needs.prepare.outputs.version}} | |
mode=${{ env.MODE }} | |
helm-chart: | |
name: 📦 Helm Chart | |
if: ${{ !startsWith(github.ref, 'refs/heads/dependabot/') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: 'Build Helm Chart' | |
uses: docker://codeanker/drone-helm:f180375 | |
env: | |
PLUGIN_AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
PLUGIN_AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
PLUGIN_CHART_NAME: thesis-signage-app | |
deploy: | |
name: 🚀 Deploy | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
needs: [prepare, helm-chart, build-api, build-client, lint] | |
steps: | |
- name: Cleanup | |
run: | | |
rm -rf ./.github/actions | |
- name: Private actions checkout | |
uses: daspn/private-actions-checkout@v2 | |
with: | |
actions_list: '["codeanker/actions@master"]' | |
checkout_base_path: ./.github | |
app_id: ${{ secrets.APP_ID }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Create Deployment | |
uses: ./.github/actions/create-deployment | |
with: | |
environment: staging-thesis-signage-app | |
app_id: ${{ secrets.APP_ID }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
auto_merge: 'false' | |
- name: Bump k8s-staging Helm Version | |
uses: ./.github/actions/bump-version | |
with: | |
app_id: ${{ secrets.APP_ID }} | |
app_private_key: ${{ secrets.APP_PRIVATE_KEY }} | |
release: 'thesis-signage-app' | |
repo: infra-aws-general-staging | |
version: ${{needs.prepare.outputs.version}}-${{needs.prepare.outputs.commit}} |