funcionando #13
This file contains hidden or 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 ] # Will trigger on push to main or master branch | |
| workflow_dispatch: # Allows manual workflow runs from GitHub Actions tab | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout 🛎️ | |
| uses: actions/checkout@v3 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' # or your preferred Node.js version | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| env: | |
| VITE_TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }} | |
| # If using React Router, create a 404.html that redirects to index.html | |
| - name: Create 404 page | |
| run: cp dist/index.html dist/404.html | |
| # Deploy to GitHub Pages | |
| - name: Deploy 🚀 | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| folder: dist # The folder the action should deploy | |
| branch: gh-pages # The branch the action should deploy to |