Updating changelog for 1.2.4 #60
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to S3 | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
concurrency: | |
# SHA is added to the end if on `main` to let all main workflows run | |
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }} | |
cancel-in-progress: true | |
jobs: | |
build-and-deploy: | |
name: Build CADT App and Upload to S3 | |
runs-on: [k8s-public] | |
container: | |
image: ubuntu:latest | |
steps: | |
- name: Install AWS CLI | |
run: | | |
apt-get update | |
export DEBIAN_FRONTEND=noninteractive | |
export TZ=Etc/UTC | |
apt-get install -y awscli | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
- name: Setup Node 18.16 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.16' | |
- name: Install Husky | |
run: npm install --save-dev husky | |
- name: npm install and build | |
env: | |
REACT_APP_API_HOST: "https://api-green.climatewarehouse.chia.net/v1" | |
REACT_APP_APP_URL: "http://green-cw-ui.s3-website-us-west-2.amazonaws.com/" | |
run: | | |
node --version | |
npm install | |
npm run build | |
- name: Vault Login | |
uses: Chia-Network/actions/vault/login@main | |
with: | |
vault_url: ${{ secrets.VAULT_URL }} | |
role_name: github-climate-warehouse-ui | |
- name: Get ephemeral aws credentials | |
uses: Chia-Network/actions/vault/aws-sts@main | |
with: | |
vault_url: ${{ secrets.VAULT_URL }} | |
vault_token: ${{ env.VAULT_TOKEN }} | |
backend_name: aws-carbon | |
role_name: cw-s3-deploy | |
- name: Upload build folder to S3 (green) | |
run: | | |
aws s3 sync --delete --no-progress ./build/ s3://green-cw-ui/ |