mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2024-11-09 23:39:40 +00:00
27 lines
No EOL
870 B
YAML
27 lines
No EOL
870 B
YAML
name: remote ssh command
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build & deploy
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
steps:
|
|
- name: Set Short SHA
|
|
id: short_sha
|
|
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
- name: executing remote ssh commands using password
|
|
uses: appleboy/ssh-action@v0.1.8
|
|
with:
|
|
context: .
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USERNAME }}
|
|
password: ${{ secrets.PASSWORD }}
|
|
port: ${{ secrets.PORT }}
|
|
script: |
|
|
cd /${{ secrets.USERNAME }}
|
|
export REACT_APP_BUILD_SHA=${{ steps.short_sha.outputs.short_sha }}
|
|
export REACT_APP_BUILD_ID=${{ github.run_id }}
|
|
export REACT_APP_BUILD_NUM=${{ github.run_number }}
|
|
bash ./deploy.sh ${{ github.event.repository.name }} |