Deploy Workspace Terminal #9
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 Workspace Terminal | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| target_host: | |
| description: 'Target host to deploy to' | |
| required: true | |
| default: 'westoverxyz' | |
| type: choice | |
| options: | |
| - westoverxyz | |
| - westoverdev | |
| - bumblebee | |
| - optimus-prime | |
| jobs: | |
| deploy: | |
| runs-on: [self-hosted, app-server] | |
| steps: | |
| - name: Checkout nds_server | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: neherdata/nds_server | |
| token: ${{ secrets.NDS_HELPER_TOKEN }} | |
| - name: Run Ansible deployment | |
| working-directory: ansible | |
| run: | | |
| # Determine target host | |
| if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then | |
| TARGET_HOST="${{ inputs.target_host }}" | |
| else | |
| TARGET_HOST="westoverxyz" | |
| fi | |
| # Run Ansible playbook | |
| ansible-playbook playbooks/deploy-workspace-terminal.yml \ | |
| -e target_host=$TARGET_HOST \ | |
| -i inventory/hosts.yml | |
| env: | |
| ANSIBLE_HOST_KEY_CHECKING: 'false' |