Deploy Artifacts (environment=staging workflow-run=12620703130 ) #7
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 Artifacts | |
run-name: Deploy Artifacts (environment=${{ inputs.environment }} workflow-run=${{ inputs.workflow-run }} ) | |
on: | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: Environment | |
type: environment | |
default: staging | |
required: true | |
workflow-run: | |
description: Workflow Run ID | |
type: string | |
required: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: ${{ inputs.environment }} | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS }} | |
steps: | |
- run: df -h | |
- uses: actions/download-artifact@v4 | |
with: | |
name: public | |
run-id: ${{ inputs.workflow-run }} | |
github-token: ${{ secrets.REPO_TOKEN }} | |
path: ${{ runner.temp }} | |
- run: df -h | |
- run: xz -9 ${{ runner.temp }}/public.tar | |
- run: df -h | |
- run: tar xJf ${{ runner.temp }}/public.tar.xz | |
- run: df -h | |
- run: aws s3 sync . s3://products-qa.conholdate.com/ | |
if: github.event.inputs.environment == 'staging' | |
- run: aws s3 sync . s3://products.conholdate.com/ | |
if: github.event.inputs.environment == 'production' |