Skip to content

Fix network mode bug (Fix #53) #82

Fix network mode bug (Fix #53)

Fix network mode bug (Fix #53) #82

name: Deploy BulletGCSS UI on FPV Sampa
on: [push] # tells github to run this on any push to the repository
jobs:
deploy:
runs-on: ubuntu-latest
env:
SHA: ${{ github.sha }}
RUNID: ${{ github.run_id }}
if: github.ref == 'refs/heads/master' # we tell Github to only execute this step if we're on our master branch (so we don't put unfinished branches in production)
steps:
- name: Deploying UI to FPV Sampa
uses: appleboy/ssh-action@master # An action made to control Linux servers
with: # We set all our secrets here for the action, these won't be shown in the action logs
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd /home/bulletgcss/ci/BulletGCSS/
git checkout master
git pull
rsync -av /home/bulletgcss/ci/BulletGCSS/UI/ /home/bulletgcss/bulletgcss.fpvsampa.com/
sed -i 's/(UNIQUEID)/${{ env.RUNID }}/g' /home/bulletgcss/bulletgcss.fpvsampa.com/basicui.html
sed -i 's/(VERSION)/${{ env.SHA }}/g' /home/bulletgcss/bulletgcss.fpvsampa.com/basicui.html
sed -i 's/(UNIQUEID)/${{ env.RUNID }}/g' /home/bulletgcss/bulletgcss.fpvsampa.com/uiversion.json