From 03feedf89775b13316a7ca46cab0cb9734b088ce Mon Sep 17 00:00:00 2001 From: Katie McLaughlin Date: Fri, 21 Oct 2022 10:10:38 -0700 Subject: [PATCH] Migrate from Netlify to Firebase --- .firebaserc | 5 +++++ .github/workflows/ci.yml | 40 ++++++++++++++++++++++++---------------- firebase.json | 10 ++++++++++ 3 files changed, 39 insertions(+), 16 deletions(-) create mode 100644 .firebaserc create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..7ad6dc6 --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "beeware-org" + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39a554b..9c8cbff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,21 +3,29 @@ on: pull_request: jobs: - build: - name: Build site + build_and_preview: + if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: '3.X' - - name: Install dependencies - run: | - pip install --upgrade pip - pip install --upgrade setuptools wheel - pip install -r requirements.txt - - name: Build site - run: | - lektor plugins reinstall - lektor build --no-prune + - uses: actions/checkout@v1 + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: '3.X' + - name: Install dependencies + run: | + pip install --upgrade pip + pip install --upgrade setuptools wheel + pip install -r requirements.txt + - name: Build site + run: | + lektor plugins reinstall + lektor build --no-prune -O output + + # Generated from 'firebase init hosting' + - uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_BEEWARE_ORG }}' + projectId: beeware-org + diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..0d2b97c --- /dev/null +++ b/firebase.json @@ -0,0 +1,10 @@ +{ + "hosting": { + "public": "output", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +}