commit
2dc12bc1a0
2 changed files with 41 additions and 3 deletions
|
|
@ -14,9 +14,9 @@ jobs:
|
|||
id: set-destination
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
echo "DESTINATION=/Lantaeu/dtch/" >> $GITHUB_ENV
|
||||
echo "DESTINATION=/LantaeuSSD/dtch/" >> $GITHUB_ENV
|
||||
else
|
||||
echo "DESTINATION=/Lantaeu/dtch_dev/" >> $GITHUB_ENV
|
||||
echo "DESTINATION=/LantaeuSSD/dtch_dev/" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Checkout
|
||||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: SFTP upload
|
||||
uses: Dylan700/sftp-upload-action@latest
|
||||
with:
|
||||
dry-run: true
|
||||
dry-run: false
|
||||
server: ${{secrets.SYNADDR}}
|
||||
username: ${{secrets.SYNUSR}}
|
||||
password: ${{secrets.SYNPASS}}
|
||||
38
.github/workflows/dtchsyn_v2.bck
vendored
Normal file
38
.github/workflows/dtchsyn_v2.bck
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- main
|
||||
|
||||
name: Publish Website
|
||||
jobs:
|
||||
web-deploy:
|
||||
name: Deploy based on branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Set destination path based on branch
|
||||
id: set-destination
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
echo "DESTINATION=/Lantaeu/dtch/" >> $GITHUB_ENV
|
||||
else
|
||||
echo "DESTINATION=/Lantaeu/dtch_dev/" >> $GITHUB_ENV
|
||||
fi
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Show upload destination
|
||||
run: |
|
||||
echo "Uploading to: $DESTINATION"
|
||||
|
||||
- name: Upload via SFTP
|
||||
uses: pressidium/lftp-mirror-action@v1
|
||||
with:
|
||||
host: ${{ secrets.SYNADDR }}
|
||||
port: 22
|
||||
user: ${{ secrets.SYNUSR }}
|
||||
pass: ${{ secrets.SYNPASS }}
|
||||
localDir: ./
|
||||
remoteDir: ${{ env.DESTINATION }}
|
||||
args: "--exclude-glob *.git --exclude-glob config.php --exclude-glob data/**/*.json"
|
||||
Loading…
Add table
Add a link
Reference in a new issue