Skip to content

Commit 44b953a

Browse files
committed
test upload to s3
1 parent 2e14a0c commit 44b953a

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

.github/workflows/build.yaml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ jobs:
3131
- name: Build the static website
3232
run: |
3333
yarn install
34-
yarn run build
35-
34+
yarn run build:storybook
35+
36+
- name: Upload to S3
37+
run: |
38+
~/scripts/publish-s3.sh
39+
3640
- name: Upload artifact
3741
uses: actions/upload-pages-artifact@v3
3842
with:

scripts/publish-s3.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Upload the built storybook to S3
2+
# load environment variables from .env file
3+
export $(grep -v '^#' .env | xargs)
4+
5+
# Use Rclone to sync the built storybook to S3, without RClone config
6+
7+
echo "Uploading to S3 bucket: $S3_BUCKET"
8+
9+
rclone sync ./storybook-static \
10+
:s3:"$S3_BUCKET/$S3_PATH" \
11+
--s3-provider=Ceph \
12+
--s3-endpoint="$S3_ENDPOINT" \
13+
--s3-access-key-id="$S3_ACCESS_KEY" \
14+
--s3-secret-access-key="$S3_SECRET_KEY"

0 commit comments

Comments
 (0)