remove build #18
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 React and FastAPI to AWS | |
on: | |
push: | |
branches-ignore: | |
- feedback | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# 1. Checkout do repositório | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# 2. Build do React | |
- name: Build React app | |
working-directory: ./app | |
run: | | |
npm install | |
npm run build | |
ls -la build | |
# 3. Verificar arquivos antes de compactar | |
- name: Verify files before compression | |
run: | | |
echo "Workspace files:" | |
ls -la | |
echo "App directory:" | |
ls -la ./app | |
echo "Build directory:" | |
ls -la ./app/build | |
# 4. Compactar arquivos | |
- name: Compress files for SCP | |
run: | | |
if [ -d "./app/build" ]; then | |
tar -czf deploy.tar.gz ./app ./back ./docker-compose.yml .dvc .dvcignore | |
else | |
echo "Build directory not found!" | |
exit 1 | |
fi | |