test clone
This commit is contained in:
parent
21fb51b3eb
commit
ab67d08f53
43
.github/workflows/repopush.yml
vendored
43
.github/workflows/repopush.yml
vendored
@ -1,18 +1,33 @@
|
|||||||
# push contents of this repo to specified repo on github on commit
|
name: Pull changes and deploy API
|
||||||
name: push this repo to bundle repo
|
|
||||||
on: [push]
|
on: [push]
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
name: Build
|
||||||
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Executing remote command
|
||||||
- name: push to bundle repo
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
uses: ad-m/github-push-action@master
|
with:
|
||||||
with:
|
host: ${{ secrets.R_HOST }}
|
||||||
github_token: ${{ secrets.AA_TOKEN }}
|
username: ${{ secrets.P_USERNAME }}
|
||||||
branch: master
|
password: ${{ secrets.P_PASSWORD }}
|
||||||
force: true
|
port: ${{ secrets.SSH_PORT }}
|
||||||
directory: .
|
script: |
|
||||||
repository: ranchimall/dappbundle
|
if [ -d "/home/production/deployed/dappbundle" ]; then
|
||||||
|
echo "Folder exists. Skipping Git clone."
|
||||||
|
else
|
||||||
|
echo "Folder does not exist. Cloning repository..."
|
||||||
|
git clone https://github.com/ranchimall/dappbundle.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d "/home/production/deployed/dappbundle/${{ github.event.repository.name }}" ]; then
|
||||||
|
echo "Repository exists. Skipping Git clone."
|
||||||
|
else
|
||||||
|
echo "Repo does not exist. Cloning repository..."
|
||||||
|
cd "/home/production/deployed/dappbundle && git clone https://github.com/ranchimall/${{ github.event.repository.name }}.git
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "/home/production/deployed/dappbundle/${{ github.event.repository.name }}" && rm -r .git
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user