Skip to content

Commit

Permalink
ci: try to fix upload using a github action from aws
Browse files Browse the repository at this point in the history
  • Loading branch information
matthprost committed Jan 27, 2025
1 parent df06c0a commit 3bcd529
Showing 1 changed file with 3 additions and 18 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/test-illustrations-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit 3bcd529

Please sign in to comment.