Skip to content

Commit

Permalink
ci: create separate action for test
Browse files Browse the repository at this point in the history
  • Loading branch information
Palke committed Sep 25, 2024
1 parent 0b42958 commit 29281d1
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/publish-cdn-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish test CDN artifacts (versioned) to S3
run-name: Publish test CDN artifacts - versioned by @${{ github.actor }}

on:
workflow_dispatch:

concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true

jobs:
publish-cdn:
if: |
github.repository == 'IBM/plex'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: '0'
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Build cdn folder
run: yarn build:cdn
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.COMMON_COS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.COMMON_COS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COMMON_COS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.COMMON_COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }}
SOURCE_DIR: 'cdn'
DEST_DIR: '/common/carbon/plex-test'
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
env:
AWS_S3_BUCKET: ${{ secrets.COMMON_COS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.COMMON_COS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.COMMON_COS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.COMMON_COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }}
SOURCE_DIR: 'cdn'
DEST_DIR: '/common/carbon-for-ibm-dotcom/plex-test'
4 changes: 2 additions & 2 deletions .github/workflows/publish-cdn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
AWS_REGION: ${{ secrets.COMMON_COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }}
SOURCE_DIR: 'cdn'
DEST_DIR: '/common/carbon/plex-test'
DEST_DIR: '/common/carbon/plex'
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks
Expand All @@ -47,4 +47,4 @@ jobs:
AWS_REGION: ${{ secrets.COMMON_COS_REGION }}
AWS_S3_ENDPOINT: https://${{ secrets.COMMON_COS_ENDPOINT }}
SOURCE_DIR: 'cdn'
DEST_DIR: '/common/carbon-for-ibm-dotcom/plex-test'
DEST_DIR: '/common/carbon-for-ibm-dotcom/plex'

0 comments on commit 29281d1

Please sign in to comment.