diff --git a/.firebase/hosting.ZGlzdA.cache b/.firebase/hosting.ZGlzdA.cache new file mode 100644 index 0000000..85e563a --- /dev/null +++ b/.firebase/hosting.ZGlzdA.cache @@ -0,0 +1,8 @@ +404.html,1735578313954,762bf484ba67404bd1a3b181546ea28d60dfddf18e9dd4795d8d25bcf3c1a890 +index.html,1735579531170,6c115784ef51ac9d429c61c6f728de39ed972a34fdc4d67bb1a766972b82ae50 +index.e6125fb6.css,1735579531178,f72c2f57010efd89d5ca54aeff7a1ef9cd084107727308e5cf105c24dcb5c2ce +index.e6125fb6.css.map,1735579531226,c19648dc3e8092cc13b2e919faa9830cac64f1e208f270eeb6c6bc49676b21a2 +banner.e7f60ced.svg,1735579531111,19635de488966d3700e7afb46fb8348d8110a5e1507d752fd86505132e513795 +logo.411ee541.png,1735579530550,96c9368cd03abaf12c77cf40d64ab921e5ecffba29732e87ba5ca8baf789d4fc +index.65f9a85a.js,1735579531178,30b8043743035d990928069fe0c7d05c60b565d6c2f03d72120ca4a24462828d +index.65f9a85a.js.map,1735579531229,249b839f93471099424b5b354f69fa1f811daf0e71aefb37c38c4a32ec72e81d diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..7aad2d0 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "flupke-pers" + } +} diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml new file mode 100644 index 0000000..c4a41b7 --- /dev/null +++ b/.github/workflows/firebase-hosting-merge.yml @@ -0,0 +1,20 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on merge +on: + push: + branches: + - main +jobs: + build_and_deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci && npx parcel build src/index.html + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUPKE_PERS }} + channelId: live + projectId: flupke-pers diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml new file mode 100644 index 0000000..1d06463 --- /dev/null +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -0,0 +1,21 @@ +# This file was auto-generated by the Firebase CLI +# https://github.com/firebase/firebase-tools + +name: Deploy to Firebase Hosting on PR +on: pull_request +permissions: + checks: write + contents: read + pull-requests: write +jobs: + build_and_preview: + if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: npm ci && npx parcel build src/index.html + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: ${{ secrets.GITHUB_TOKEN }} + firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_FLUPKE_PERS }} + projectId: flupke-pers diff --git a/README.md b/README.md index 96fcedf..5f27a66 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Personnal website - start dev: `npx parcel src/index.html` -- build prod: `npx parcel build src/index.html` \ No newline at end of file +- build prod: `npx parcel build src/index.html` +- deploy: `npm ci; npx parcel build src/index.html` diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..059fe4f --- /dev/null +++ b/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +}