use pip install awscli

This commit is contained in:
sillyguodong 2023-05-26 17:29:33 +08:00
parent f97537a991
commit 97264b9bae
No known key found for this signature in database
GPG Key ID: 4A0646FA86256DF4
1 changed files with 1 additions and 3 deletions

View File

@ -6,8 +6,6 @@ jobs:
build-and-deploy:
name: build and deploy
runs-on: ubuntu-latest
container:
image: alpine:latest
steps:
- name: Checkout
uses: actions/checkout@v3
@ -29,7 +27,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.preview_aws_access_token }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.preview_aws_secret_access_key }}
run: |
apk add --no-cache aws-cli
pip install awscli
aws s3api create-bucket --acl public-read --bucket preview-gitea-org-website-${{ github.event.pull_request.head.repo.name }}-${{ github.event.pull_request.number }} --region ${{ env.AWS_REGION }}} --create-bucket-configuration LocationConstraint=${{ env.AWS_REGION }}} || /bin/true
aws s3 website s3://preview-gitea-org-website-${{ github.event.pull_request.head.repo.name }}-${{ github.event.pull_request.number }}/ --index-document index.html --error-document error.html || /bin/true
- name: "[PR] deploy website to S3 bucket"