Changing build to Github servers
This commit is contained in:
parent
cd8499beb4
commit
52405d93dd
25
.github/workflows/push-dappbundle.yml
vendored
25
.github/workflows/push-dappbundle.yml
vendored
@ -1,9 +1,12 @@
|
|||||||
name: Workflow push to Dappbundle
|
name: Workflow push to Dappbundle
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: self-hosted
|
runs-on: ubuntu-latest # ✅ Changed from self-hosted to GitHub-hosted
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Executing remote command
|
- name: Executing remote command
|
||||||
uses: appleboy/ssh-action@v1.0.0
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
@ -13,20 +16,24 @@ jobs:
|
|||||||
password: ${{ secrets.P_PASSWORD }}
|
password: ${{ secrets.P_PASSWORD }}
|
||||||
port: ${{ secrets.SSH_PORT }}
|
port: ${{ secrets.SSH_PORT }}
|
||||||
script: |
|
script: |
|
||||||
if [ -d "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle" ]; then
|
if [ -d "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle" ]; then
|
||||||
echo "Folder exists. Skipping Git clone."
|
echo "Folder exists. Skipping Git clone."
|
||||||
else
|
else
|
||||||
echo "Folder does not exist. Cloning repository..."
|
echo "Folder does not exist. Cloning repository..."
|
||||||
cd ${{ secrets.DEPLOYMENT_LOCATION}}/ && git clone https://github.com/ranchimall/dappbundle.git
|
cd "${{ secrets.DEPLOYMENT_LOCATION }}" && git clone https://github.com/ranchimall/dappbundle.git
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}" ]; then
|
if [ -d "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle/${{ github.event.repository.name }}" ]; then
|
||||||
echo "Repository exists. Remove folder "
|
echo "Repository exists. Removing folder."
|
||||||
rm -r "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}"
|
rm -rf "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle/${{ github.event.repository.name }}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Cloning repository..."
|
echo "Cloning repository..."
|
||||||
cd ${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle && git clone https://github.com/ranchimall/${{ github.event.repository.name }}
|
cd "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle" && git clone https://github.com/ranchimall/${{ github.event.repository.name }}
|
||||||
|
|
||||||
cd "${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/${{ github.event.repository.name }}" && rm -rf .gitattributes .git .github .gitignore
|
cd "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle/${{ github.event.repository.name }}" && rm -rf .gitattributes .git .github .gitignore
|
||||||
cd ${{ secrets.DEPLOYMENT_LOCATION}}/dappbundle/ && git add . && git commit -m "Workflow updating files of ${{ github.event.repository.name }}" && git push "https://ranchimalldev:${{ secrets.RM_ACCESS_TOKEN }}@github.com/ranchimall/dappbundle.git"
|
|
||||||
|
cd "${{ secrets.DEPLOYMENT_LOCATION }}/dappbundle" && \
|
||||||
|
git add . && \
|
||||||
|
git commit -m "Workflow updating files of ${{ github.event.repository.name }}" && \
|
||||||
|
git push "https://ranchimalldev:${{ secrets.RM_ACCESS_TOKEN }}@github.com/ranchimall/dappbundle.git"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user