Sensor Translation Mappings #11
Workflow file for this run
This file contains hidden or 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
| name: Deploy Frontend to HA Repo | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Frontend Repository | |
| uses: actions/checkout@v3 | |
| with: | |
| repository: OpenGrow-Box/OpenGrowBox-Frontend | |
| path: frontend-repo | |
| - name: Install Dependencies | |
| run: | | |
| cd frontend-repo | |
| npm install | |
| - name: Build Frontend | |
| run: | | |
| cd frontend-repo | |
| npm run build | |
| - name: Setup SSH Key | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.HA_DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519 | |
| chmod 600 ~/.ssh/id_ed25519 | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| - name: Checkout Home Assistant Repository | |
| run: | | |
| git clone git@github.com:OpenGrow-Box/OpenGrowBox-HA.git ha-repo | |
| - name: Copy Built File to HA Repo | |
| run: | | |
| rm -f ha-repo/custom_components/opengrowbox/frontend/static/static/js/main.js # Altes main.js löschen | |
| cp frontend-repo/dist/assets/index*.js ha-repo/custom_components/opengrowbox/frontend/static/static/js/main.js | |
| - name: Commit and Push Changes | |
| run: | | |
| cd ha-repo | |
| git config user.name "OpenGrowBox" | |
| git config user.email "info@opengrowbox.net" | |
| git add . | |
| git commit -m "Deploy frontend build from OpenGrowBox-Frontend" | |
| git push |