Skip to content

Workflow file for this run

name: Deploy on deploy tag
on:
push
jobs:
deploy-web-minusxapi-com:
runs-on: ubuntu-latest
# if: github.ref == 'refs/heads/main'
steps:
- name: Set up SSH
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PROD_SERVER_SSH_KEY }}" > ~/.ssh/id_rsa
echo "${{ secrets.PROD_SERVER_SSH_PUB_KEY }}" > ~/.ssh/id_rsa.pub
chmod 600 ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa.pub
ssh-keyscan -H v1.minusxapi.com >> ~/.ssh/known_hosts
- name: Run frontend server (v1)
env:
REF: ${{ github.sha }} # trying ref
run: |
echo $REF
ssh [email protected] << 'EOF'
cd /home/minusx/minusx/web
echo "can you read this" $REF
echo $REF
echo $REF >> /tmp/test.txt
git fetch --all --tags
git checkout $REF
git reset --hard $REF
# docker compose up -d --build
docker image prune -f
echo "what is happening"
echo $REF
EOF
echo "echo $REF"