Fixed deployment #20
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 # or your default branch | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v2 | |
| - name: Generate Firebase Config File | |
| run: | | |
| echo "Generating firebase-config.js..." | |
| cat <<EOF > scripts/firebase-config.js | |
| import { initializeApp } from "https://www.gstatic.com/firebasejs/11.3.1/firebase-app.js"; | |
| import { getAuth } from "https://www.gstatic.com/firebasejs/11.3.1/firebase-auth.js"; | |
| import { getFirestore } from "https://www.gstatic.com/firebasejs/11.3.1/firebase-firestore.js"; | |
| const firebaseConfig = { | |
| apiKey: "${{ secrets.FIREBASE_API_KEY }}", | |
| authDomain: "${{ secrets.FIREBASE_AUTH_DOMAIN }}", | |
| projectId: "${{ secrets.FIREBASE_PROJECT_ID }}", | |
| storageBucket: "${{ secrets.FIREBASE_STORAGE_BUCKET }}", | |
| messagingSenderId: "${{ secrets.FIREBASE_MESSAGING_SENDER_ID }}", | |
| appId: "${{ secrets.FIREBASE_APP_ID }}" | |
| }; | |
| const app = initializeApp(firebaseConfig); | |
| const auth = getAuth(app); | |
| const db = getFirestore(app); | |
| export { auth, db }; | |
| EOF | |
| - name: Install Dependencies | |
| run: npm install | |
| - name: Build Project | |
| run: npm run build # This will now run Tailwind and Eleventy | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| personal_token: ${{ secrets.PERSONAL_TOKEN }} | |
| publish_dir: ./_site # adjust if your build output directory is different |