Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment out dev deploy #1067

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading