-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: try to fix upload using a github action from aws
- Loading branch information
1 parent
df06c0a
commit 3bcd529
Showing
1 changed file
with
3 additions
and
18 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,31 +19,16 @@ jobs: | |
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Python environment | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- uses: pnpm/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- run: pnpm install | ||
|
||
- name: Install aws CLI | ||
run: | | ||
pip3 install awscli_plugin_endpoint && pip3 show awscli_plugin_endpoint | ||
- name: AWS CLI configuration | ||
run: | | ||
mkdir ~/.aws | ||
cp ./.aws/* ~/.aws/ | ||
sed -i -e 's/${BUCKET_REGION}/${{env.BUCKET_REGION}}/g' ~/.aws/config | ||
- name: Upload illustrations on bucket | ||
- name: Sync to S3 | ||
run: | | ||
aws s3 sync packages/illustrations/src/assets/favicon s3://${{ env.BUCKET_NAME }}/illustrations/ --exclude "*" --include "*.webp" --include "*.svg" --acl public-read --cache-control max-age=2592000,public | ||
aws s3api put-bucket-cors --bucket ${{ env.BUCKET_NAME }} --cors-configuration file://.aws/cors.json | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.TEST_S3_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_S3_SECRET_KEY }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_KEY }} |