Merge pull request #15 from VyvaHart/dev #1
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 # master 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: your-aws-region | |
- name: Download from S3 | |
uses: actions/download-artifact@v3 | |
with: | |
name: mandelbrot-assets | |
path: ./assets/ | |
- name: Deploy to GitHub Pages | |
run: | | |
cp -r -u ./assets/* ./ # Copy assets, overwriting only if newer | |
git config user.name "GitHub Actions Bot" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m "Deploy from S3" || echo "No changes to commit" # Handle no changes | |
git push origin main |