mirror of
https://github.com/GuerillaStudio/now-playing
synced 2024-11-29 18:21:39 +00:00
Fix AWS-CLI in runner
This commit is contained in:
parent
c346044032
commit
ce79a8be89
1 changed files with 8 additions and 17 deletions
25
.github/workflows/deploy-deuxfleurs.yml
vendored
25
.github/workflows/deploy-deuxfleurs.yml
vendored
|
@ -24,22 +24,13 @@ jobs:
|
||||||
- name: Build Hugo
|
- name: Build Hugo
|
||||||
run: |
|
run: |
|
||||||
hugo -b "${{secrets.BASE_URL}}"
|
hugo -b "${{secrets.BASE_URL}}"
|
||||||
- name: Install AWS CLI
|
- name: Configure AWS Credentials
|
||||||
uses: unfor19/install-aws-cli-action@v1
|
uses: aws-actions/configure-aws-credentials@v1
|
||||||
|
with:
|
||||||
|
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
aws-region: garage
|
||||||
- name: Deploy to Deuxfleurs
|
- name: Deploy to Deuxfleurs
|
||||||
run: |
|
run: |
|
||||||
touch ~/.awsrc
|
aws --endpoint-url https://garage.deuxfleurs.fr --version
|
||||||
echo "export AWS_ACCESS_KEY_ID=${{secrets.AWS_ACCESS_KEY_ID}}" >> ~/.awsrc
|
aws --endpoint-url https://garage.deuxfleurs.fr s3 sync --delete public s3://now-playing?endpoint=garage.deuxfleurs.fr®ion=garage&s3ForcePathStyle=true
|
||||||
echo "export AWS_SECRET_ACCESS_KEY=${{secrets.AWS_SECRET_ACCESS_KEY}}" >> ~/.awsrc
|
|
||||||
echo "export AWS_DEFAULT_REGION='garage'" >> ~/.awsrc
|
|
||||||
mkdir ~/.aws
|
|
||||||
touch ~/.aws/credentials
|
|
||||||
echo "[default]" >> ~/.aws/credentials
|
|
||||||
echo "aws_access_key_id = ${{secrets.AWS_ACCESS_KEY_ID}}" >> ~/.aws/credentials
|
|
||||||
echo "aws_secret_access_key = ${{secrets.AWS_SECRET_ACCESS_KEY}}" >> ~/.aws/credentials
|
|
||||||
echo "region = garage" >> ~/.aws/credentials
|
|
||||||
function aws { command aws --endpoint-url https://garage.deuxfleurs.fr $@ ; }
|
|
||||||
aws --version
|
|
||||||
source ~/.awsrc
|
|
||||||
aws s3 website now-playing --index-document index.html --error-document 404.html
|
|
||||||
aws s3 sync --delete public s3://now-playing
|
|
||||||
|
|
Loading…
Reference in a new issue