Merge pull request #23 from VyvaHart/dev #12
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
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # main branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Configure AWS Credentials | |
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: eu-central-1 | |
- name: Download assets from S3 | |
run: | | |
mkdir -p ./assets # Ensure this folder exists | |
aws s3 cp s3://mandelbrot-assets/assets ./assets/ --recursive | |
- name: Deploy to GitHub Pages | |
run: | | |
git config user.name "GitHub Actions Bot" | |
git config user.email "[email protected]" | |
git add . # Corrected the spacing | |
git commit -m "Deploy from S3" || echo "No changes to commit" # Handle no changes | |
git push origin main |