Skip to content

Refactor component styles #73

Refactor component styles

Refactor component styles #73

Workflow file for this run

name: CI + CD
on:
push:
pull_request:
workflow_dispatch:
jobs:
get-environment-name:
name: "Extract environment name"
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.extract.outputs.environment }}
steps:
- id: extract
run: echo "environment=$(echo $GITHUB_REF | sed -e '/^refs\/heads\/deploy-\(.*\)$/!d;s//\1/')" >> $GITHUB_OUTPUT
- env:
EXTRACTED: ${{ steps.extract.outputs.environment }}
run: 'echo "Extracted environment name: $EXTRACTED"'
deploy:
name: "Deploy"
if: ${{ github.event_name == 'push' && needs.get-environment-name.outputs.environment }}
needs:
- get-environment-name
environment: ${{ needs.get-environment-name.outputs.environment }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: sudo apt-get update -y && sudo apt-get install -y lftp
- uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
- run: sudo apt-get update -y && sudo apt-get install -y lftp
- uses: ./.github/actions/deploy
with:
ssh-username: ${{ secrets.SSH_USERNAME }}
ssh-host: ${{ vars.SSH_HOST }}
ssh-backend-directory: ${{ vars.SSH_BACKEND_DIRECTORY }}
ssh-frontend-directory: ${{ vars.SSH_FRONTEND_DIRECTORY }}
app-name: ${{ vars.APP_NAME }}
app-key: ${{ secrets.APP_KEY }}
backend-url: ${{ vars.BACKEND_URL }}
frontend-url: ${{ vars.FRONTEND_URL }}
db-host: ${{ secrets.DB_HOST }}
db-database: ${{ secrets.DB_DATABASE }}
db-username: ${{ secrets.DB_USERNAME }}
db-password: ${{ secrets.DB_PASSWORD }}
midata-base-url: ${{ vars.MIDATA_BASE_URL }}
midata-client-uid: ${{ vars.MIDATA_CLIENT_UID }}
midata-client-secret: ${{ secrets.MIDATA_CLIENT_SECRET }}
seed-db: ${{ vars.SEED_DB }}