Skip to content

feat: add MFE bucket deploy workflow#3

Merged
Ang-m4 merged 2 commits intomainfrom
afg/add-mfe-s3-deploy-workflow
Mar 11, 2025
Merged

feat: add MFE bucket deploy workflow#3
Ang-m4 merged 2 commits intomainfrom
afg/add-mfe-s3-deploy-workflow

Conversation

@Ang-m4
Copy link
Collaborator

@Ang-m4 Ang-m4 commented Mar 10, 2025

Description

This pull request adds a new reusable workflow file for deploying MFEs to an S3 bucket across different repositories. The changes are minimal compared to the initial version; the main improvements are in naming conventions and parameter definitions.

Changes

  • Renamed variables and steps
  • Defined explicit inputs and secrets for easier configuration and reuse.

How to Call the Workflow

Include the following snippet in your GitHub Actions workflow file to call the reusable workflow:

jobs:
  call-deployment-workflow:
    uses: necl/actions-hub/mfe-s3-bucket-deployment/action.yml@main
    with:
      NODE_VERSION: '16.x'
      PUBLIC_PATH_CDN: 'https://your-cdn.example.com/path/'
      APP_ID: 'your-app-id'
      MFE_CONFIG_API_URL: 'https://config-api.example.com'
      BUCKET_NAME: 'your-s3-bucket-name'
    secrets:
      AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
      AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
      AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
      AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}

@Ang-m4 Ang-m4 requested a review from johanseto March 10, 2025 14:54
Copy link

@johanseto johanseto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Little improvement comment

jobs:
build:
environment:
name: ${{ github.ref_name == 'open-release/redwood.nelp' && 'prod' || 'stage' }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by same as above? maybe some missing highlight?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


deployment:
environment:
name: ${{ github.ref_name == 'open-release/redwood.nelp' && 'prod' || 'stage' }}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
name: ${{ github.ref_name == 'open-release/redwood.nelp' && 'prod' || 'stage' }}
name: ${{ github.ref_name == inputs.prod_branch|| 'stage' }}

Could you add the prod_branch input. I am not use if in the if block you don't need {{}}

@Ang-m4 Ang-m4 force-pushed the afg/add-mfe-s3-deploy-workflow branch from 520aef0 to 920af12 Compare March 11, 2025 14:20
@Ang-m4 Ang-m4 force-pushed the afg/add-mfe-s3-deploy-workflow branch from 920af12 to 6be53f0 Compare March 11, 2025 16:45
@Ang-m4 Ang-m4 merged commit ddb6796 into main Mar 11, 2025
2 checks passed
@Ang-m4 Ang-m4 deleted the afg/add-mfe-s3-deploy-workflow branch March 11, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants