Skip to content

the ngrok download was put in a single line #28

the ngrok download was put in a single line

the ngrok download was put in a single line #28

name: Testing Deploy Script
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Find and execute script
run: |
# Find the .sh file and execute it
SCRIPT=$(find . -type f -name "*.sh" | head -n 1)
if [ -f "$SCRIPT" ]; then
chmod +x "$SCRIPT"
./"$SCRIPT"
echo "Deployment successful: UniFi Controller is up! ✅"
else
echo "No bash script found in the repository."
exit 1
fi
#- name: Download snap binary
# run: |
# sudo apt install snapd
- name: Download ngrok binary
run: |
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc \ sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null \ && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" \ | sudo tee /etc/apt/sources.list.d/ngrok.list \ && sudo apt update \ && sudo apt install ngrok
- name: Set ngrok authtoken
run: |
ngrok config add-authtoken 1umZbVZPbfktLlkzuAMcIqofqfX_6kN2bJdpVHMNb26HSHTQ
- name: Start ngrok tunnel
run: |
ngrok http 8443 &
sleep 3 # Wait for ngrok to initialize
echo "Ngrok tunnel is now active"
cat /dev/null
- name: Keep workflow running for 5 minutes
run: sleep 300 # 300 seconds = 5 minutes