Skip to content

Commit

Permalink
Feature/new deployment (#60)
Browse files Browse the repository at this point in the history
* add a new workflow that deploys and sync files to all env when merge to main

* update changelog

* update workflow

* update workflow
  • Loading branch information
sliu008 committed Feb 28, 2024
1 parent 4335e80 commit 4c1a8c3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is the main build pipeline that verifies and publishes the software
name: Environment Deployments
# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
# First job in the workflow installs and verifies the software
deploy_sit:
name: Deploy SIT
# The type of runner that the job will run on
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

## Deployment
- name: Set AWS Env Variables
run: echo "AWS_ACCESS_KEY_ID= ${{ secrets.AWS_ACCESS_KEY_ID_SERVICES_SIT }} >> $GITHUB_ENV |
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY_SERVICES_SIT }} >> $GITHUB_ENV

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_SERVICES_SIT }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_SERVICES_SIT }}
with:
aws-region: us-west-2
role-session-name: GitHubActions
- run: aws sts get-caller-identity

- name: Sync S3
run:
aws s3 sync ./config-files s3://podaac-services-sit-hitide/dataset-configs --delete --metadata githash=${GITHUB_SHA}
aws s3 sync ./palettes s3://podaac-services-sit-hitide/palettes --delete --metadata githash=${GITHUB_SHA}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,4 @@ dmypy.json

# Pyre type checker
.pyre/
.DS_STORE
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Add new deploy workflow to deploy to all env when merge to main
### Changed
### Deprecated
### Removed
Expand Down

0 comments on commit 4c1a8c3

Please sign in to comment.