Skip to content

Commit

Permalink
Update aws_deploy_hydroserver.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kjlippold authored Feb 16, 2024
1 parent 4f7a67e commit 466f545
Showing 1 changed file with 35 additions and 15 deletions.
50 changes: 35 additions & 15 deletions .github/workflows/aws_deploy_hydroserver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,26 @@ jobs:
runs-on: ubuntu-20.04
environment: ${{ github.event.inputs.environment }}
steps:
- name: Test
run : |
echo ${{ github.event.inputs.version || 'refs/tags/$(curl -sL https://api.github.com/repos/hydroserver2/hydroserver-webapp-front/releases/latest | jq -r ".tag_name")' }}
# - name: Checkout backend repo
# uses: actions/checkout@v4
# with:
# repository: hydroserver2/hydroserver-webapp-back
# ref: ${{ github.event.inputs.version || 'refs/tags/$(curl -sL https://api.github.com/repos/hydroserver2/hydroserver-webapp-back/releases/latest | jq -r ".tag_name")' }}
# path: backend
- name: Checkout backend repo
uses: actions/checkout@v4
with:
repository: hydroserver2/hydroserver-webapp-back
ref: refs/tags/${{ github.event.inputs.version || '$(curl -sL https://api.github.com/repos/hydroserver2/hydroserver-webapp-back/releases/latest | jq -r ".tag_name")' }}
path: backend

# - name: Checkout frontend repo
# uses: actions/checkout@v4
# with:
# repository: hydroserver2/hydroserver-webapp-front
# ref: ${{ github.event.inputs.version || 'refs/tags/$(curl -sL https://api.github.com/repos/hydroserver2/hydroserver-webapp-front/releases/latest | jq -r ".tag_name")' }}
# path: frontend
- name: Checkout frontend repo
uses: actions/checkout@v4
with:
repository: hydroserver2/hydroserver-webapp-front
ref: refs/tags/${{ github.event.inputs.version || '$(curl -sL https://api.github.com/repos/hydroserver2/hydroserver-webapp-front/releases/latest | jq -r ".tag_name")' }}
path: frontend

- name: Generate ALLOWED_HOSTS value
run: |
PROXY_BASE_URL=${{ vars.PROXY_BASE_URL }}
ALLOWED_HOSTS=$(echo $PROXY_BASE_URL | sed 's/^https\?:\/\///')
echo "::set-env name=ALLOWED_HOSTS::$ALLOWED_HOSTS"
echo "$ALLOWED_HOSTS"
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
Expand Down Expand Up @@ -58,3 +62,19 @@ jobs:
# aws elasticbeanstalk update-environment \
# --environment-name hydroserver-${{ github.event.inputs.environment }}-env \
# --version-label "${{ github.event.inputs.version }}"
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=ADMIN_EMAIL,Value=${{ vars.ADMIN_EMAIL }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=ALLOWED_HOSTS,Value="$ALLOWED_HOSTS"
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=AWS_ACCESS_KEY_ID,Value=${{ secrets.AWS_ACCESS_KEY_ID }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=AWS_SECRET_ACCESS_KEY,Value=${{ secrets.AWS_SECRET_ACCESS_KEY }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=AWS_STORAGE_BUCKET_NAME,Value=hydroserver-${{ github.event.inputs.environment }}-storage
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=DATABASE_URL,Value=${{ secrets.DATABASE_URL }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=DEBUG,Value=${{ vars.DEBUG }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=DEPLOYED,Value=True
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_GOOGLE_CLIENT,Value=${{ secrets.OAUTH_GOOGLE_CLIENT }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_GOOGLE_SECRET,Value=${{ secrets.OAUTH_GOOGLE_SECRET }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_HYDROSHARE_CLIENT,Value=${{ secrets.OAUTH_HYDROSHARE_CLIENT }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_HYDROSHARE_SECRET,Value=${{ secrets.OAUTH_HYDROSHARE_SECRET }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_ORCID_CLIENT,Value=${{ secrets.OAUTH_ORCID_CLIENT }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=OAUTH_ORCID_SECRET,Value=${{ secrets.OAUTH_ORCID_SECRET }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=PROXY_BASE_URL,Value=${{ vars.PROXY_BASE_URL }}
# --option-settings Namespace=aws:elasticbeanstalk:application:environment,OptionName=SECRET_KEY,Value=${{ secrets.DJANGO_SECRET_KEY }}

0 comments on commit 466f545

Please sign in to comment.