Push latest version of @klevu/ui to Klevu CDN #3
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: Push latest version of @klevu/ui to Klevu CDN | |
on: | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- name: NPM install | |
run: npm install @klevu/ui | |
- name: Get the version of package | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
with: | |
path: node_modules/@klevu/ui | |
- name: Upload to latest folder Klevu CDN | |
uses: hkusu/s3-upload-action@v2 | |
with: | |
aws-access-key-id: ${{ secrets.RESOURCES_AWS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.RESOURCES_AWS_SECRET_ACCESS_KEY}} | |
aws-bucket: ${{ secrets.RESOURCES_AWS_BUCKET }} | |
aws-region: "eu-west-1" | |
file-path: "./node_modules/@klevu/ui/dist/" | |
destination-dir: "latest" | |
- name: Upload to version folder Klevu CDN | |
uses: hkusu/s3-upload-action@v2 | |
with: | |
aws-access-key-id: ${{ secrets.RESOURCES_AWS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.RESOURCES_AWS_SECRET_ACCESS_KEY}} | |
aws-bucket: ${{ secrets.RESOURCES_AWS_BUCKET }} | |
aws-region: "eu-west-1" | |
file-path: "./node_modules/@klevu/ui/dist/" | |
destination-dir: ${{ steps.package-version.outputs.current-version }} |