Skip to content

Commit

Permalink
Comment out dev deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
akmiller01 committed May 2, 2024
1 parent 6add3f2 commit 6720e67
Showing 1 changed file with 47 additions and 46 deletions.
93 changes: 47 additions & 46 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ jobs:
', github.ref) || startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v4
- name: Set env for develop branch
if: endsWith(github.ref, '/develop') || endsWith(github.ref, '-beta')
run: |
echo "HOST=${{ secrets.DEV_HOST }}" >> $GITHUB_ENV
echo "USERNAME=${{ secrets.DEV_USER }}" >> $GITHUB_ENV
echo "SITE_URL=staging-ddw.devinit.org" >> $GITHUB_ENV
echo "SPOTLIGHTS_URL=staging-api.devinit.org" >> $GITHUB_ENV
# - uses: actions/checkout@v4
# - name: Set env for develop branch
# if: endsWith(github.ref, '/develop') || endsWith(github.ref, '-beta')
# run: |
# echo "HOST=${{ secrets.DEV_HOST }}" >> $GITHUB_ENV
# echo "USERNAME=${{ secrets.DEV_USER }}" >> $GITHUB_ENV
# echo "SITE_URL=staging-ddw.devinit.org" >> $GITHUB_ENV
# echo "SPOTLIGHTS_URL=staging-api.devinit.org" >> $GITHUB_ENV

- name: Set env for release branch
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-beta')
Expand All @@ -131,16 +131,16 @@ jobs:
id: get_version
run: echo VERSION=$(echo $GITHUB_REF | cut -d / -f 3) >> $GITHUB_OUTPUT

- name: copy deploy scripts to dev server
if: endsWith(github.ref, '/develop') || endsWith(github.ref, '-beta')
uses: appleboy/[email protected]
with:
host: ${{ env.HOST }}
username: ${{ env.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.KEY }}
source: "deploy_script.sh,deploy.sh"
target: "."
# - name: copy deploy scripts to dev server
# if: endsWith(github.ref, '/develop') || endsWith(github.ref, '-beta')
# uses: appleboy/[email protected]
# with:
# host: ${{ env.HOST }}
# username: ${{ env.USERNAME }}
# port: ${{ secrets.PORT }}
# key: ${{ secrets.KEY }}
# source: "deploy_script.sh,deploy.sh"
# target: "."

- name: copy deploy script to production server
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-beta')
Expand All @@ -153,34 +153,34 @@ jobs:
source: "deploy.sh"
target: "."

- name: ssh into remote dev server for develop branch
if: endsWith(github.ref, '/develop')
uses: appleboy/[email protected]
with:
host: ${{ env.HOST }}
username: ${{ env.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
command_timeout: 30m
script: |
chmod 700 "deploy_script.sh"
./deploy_script.sh
- name: ssh into remote dev server for beta tag
if: endsWith(github.ref, '-beta')
uses: appleboy/[email protected]
with:
host: ${{ env.HOST }}
username: ${{ env.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
command_timeout: 30m
script: |
version=$(echo ${{ steps.get_version.outputs.VERSION }} | cut -c 2-)
export SITE_URL=${{ env.SITE_URL }}
export SPOTLIGHTS_URL=${{ env.SPOTLIGHTS_URL }}
chmod 700 "deploy.sh"
./deploy.sh $version
# - name: ssh into remote dev server for develop branch
# if: endsWith(github.ref, '/develop')
# uses: appleboy/[email protected]
# with:
# host: ${{ env.HOST }}
# username: ${{ env.USERNAME }}
# key: ${{ secrets.KEY }}
# port: ${{ secrets.PORT }}
# command_timeout: 30m
# script: |
# chmod 700 "deploy_script.sh"
# ./deploy_script.sh

# - name: ssh into remote dev server for beta tag
# if: endsWith(github.ref, '-beta')
# uses: appleboy/[email protected]
# with:
# host: ${{ env.HOST }}
# username: ${{ env.USERNAME }}
# key: ${{ secrets.KEY }}
# port: ${{ secrets.PORT }}
# command_timeout: 30m
# script: |
# version=$(echo ${{ steps.get_version.outputs.VERSION }} | cut -c 2-)
# export SITE_URL=${{ env.SITE_URL }}
# export SPOTLIGHTS_URL=${{ env.SPOTLIGHTS_URL }}
# chmod 700 "deploy.sh"
# ./deploy.sh $version

- name: ssh into remote production server
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-beta')
Expand All @@ -199,6 +199,7 @@ jobs:
./deploy.sh $version
- name: Build JS
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-beta')
uses: appleboy/[email protected]
with:
host: ${{ env.HOST }}
Expand Down

0 comments on commit 6720e67

Please sign in to comment.