Sync to new environment #199
1 changed files with 36 additions and 36 deletions
72
.github/workflows/main.yml
vendored
72
.github/workflows/main.yml
vendored
|
|
@ -1,39 +1,39 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- main
|
||||
# on:
|
||||
# push:
|
||||
# branches:
|
||||
# - dev
|
||||
# - main
|
||||
|
||||
name: Publish Website
|
||||
jobs:
|
||||
web-deploy:
|
||||
name: Deploy based on branch
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get Latest Code
|
||||
uses: actions/checkout@v3
|
||||
# name: Publish Website
|
||||
# jobs:
|
||||
# web-deploy:
|
||||
# name: Deploy based on branch
|
||||
# runs-on: ubuntu-latest
|
||||
# steps:
|
||||
# - name: Get Latest Code
|
||||
# uses: actions/checkout@v3
|
||||
|
||||
- name: Set destination path based on branch
|
||||
id: set-destination
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
echo "DESTINATION=/var/www/dtch/" >> $GITHUB_ENV
|
||||
else
|
||||
echo "DESTINATION=/var/www/dtch_dev/" >> $GITHUB_ENV
|
||||
fi
|
||||
# - name: Set destination path based on branch
|
||||
# id: set-destination
|
||||
# run: |
|
||||
# if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
# echo "DESTINATION=/var/www/dtch/" >> $GITHUB_ENV
|
||||
# else
|
||||
# echo "DESTINATION=/var/www/dtch_dev/" >> $GITHUB_ENV
|
||||
# fi
|
||||
|
||||
- name: Sync Files from ${{ github.ref }}
|
||||
uses: SamKirkland/web-deploy@v1
|
||||
with:
|
||||
target-server: ${{ secrets.DEST_SERVER }}
|
||||
remote-user: stats
|
||||
private-ssh-key: ${{ secrets.SSH_KEY }}
|
||||
destination-path: ${{ env.DESTINATION }}
|
||||
rsync-options: --no-times -r --include=config/clanmembers.json --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ --exclude=config.php
|
||||
- name: LINK TO WEBSITE
|
||||
run: |
|
||||
if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
echo "Visit the production site at: https://dtch.online"
|
||||
else
|
||||
echo "Visit the dev site at: https://dev.dtch.online"
|
||||
fi
|
||||
# - name: Sync Files from ${{ github.ref }}
|
||||
# uses: SamKirkland/web-deploy@v1
|
||||
# with:
|
||||
# target-server: ${{ secrets.DEST_SERVER }}
|
||||
# remote-user: stats
|
||||
# private-ssh-key: ${{ secrets.SSH_KEY }}
|
||||
# destination-path: ${{ env.DESTINATION }}
|
||||
# rsync-options: --no-times -r --include=config/clanmembers.json --exclude=.git* --exclude=*.json --exclude=.git/ --exclude=.github/ --exclude=config.php
|
||||
# - name: LINK TO WEBSITE
|
||||
# run: |
|
||||
# if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then
|
||||
# echo "Visit the production site at: https://dtch.online"
|
||||
# else
|
||||
# echo "Visit the dev site at: https://dev.dtch.online"
|
||||
# fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue