diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0fb5b7e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,29 @@ +name: Deploy to Firebase + +on: + push: + branches: + - master + # paths: + # - "src/**" + +jobs: + deploy_live_website: + runs-on: ubuntu-latest + steps: + - name: Checkout files + uses: actions/checkout@v4 + - name: Use Node.js 12.10.0 + uses: actions/setup-node@v3 + with: + node-version: 12.10.0 + cache: 'npm' + - run: npm i && npm run build + # now deploy to firebase + - name: Deploy site + uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_TOKEN }}' + projectId: lookingforcontributors + channelId: live diff --git a/.github/workflows/pr-deploy.yml b/.github/workflows/pr-deploy.yml new file mode 100644 index 0000000..ab12392 --- /dev/null +++ b/.github/workflows/pr-deploy.yml @@ -0,0 +1,24 @@ +name: Deploy to Firebase From PR + +on: + pull_request: + +jobs: + deploy_live_website: + runs-on: ubuntu-latest + steps: + - name: Checkout files + uses: actions/checkout@v4 + - name: Use Node.js 12.10.0 + uses: actions/setup-node@v3 + with: + node-version: 12.10.0 + cache: 'npm' + - run: npm i && npm run build + # now deploy to firebase + - name: Deploy site + uses: FirebaseExtended/action-hosting-deploy@v0 + with: + repoToken: '${{ secrets.GITHUB_TOKEN }}' + firebaseServiceAccount: '${{ secrets.FIREBASE_TOKEN }}' + projectId: lookingforcontributors