diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index c14a7dac..73b8b7b8 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -2,16 +2,24 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on merge -'on': - push: - branches: - - master +on: + push: + branches: + - master + +permissions: + pull-requests: write + contents: read + checks: write + jobs: build_and_deploy: runs-on: ubuntu-latest + env: + OKTA_APP_ISSUER: ${{secrets.OKTA_APP_ISSUER}} steps: - - uses: actions/checkout@v2 - - run: cd login-workflow && yarn install:dependencies && yarn link:workflow && cd example && yarn && yarn build + - uses: actions/checkout@v4 + - run: cd login-workflow && yarn install:dependencies && yarn link:workflow && cd example && yarn && echo "${{ secrets.OKTA_APP_ISSUER }}" > .env.local && yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 with: entryPoint: './login-workflow' diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index bd01a2a7..fffd1ff6 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -2,14 +2,23 @@ # https://github.com/firebase/firebase-tools name: Deploy to Firebase Hosting on PR -'on': pull_request + +on: pull_request + +permissions: + pull-requests: write + contents: read + checks: write + jobs: build_and_preview: if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' runs-on: ubuntu-latest + env: + OKTA_APP_ISSUER: ${{secrets.OKTA_APP_ISSUER}} steps: - - uses: actions/checkout@v2 - - run: cd login-workflow && yarn install:dependencies && yarn link:workflow && cd example && yarn && yarn build + - uses: actions/checkout@v4 + - run: cd login-workflow && yarn install:dependencies && yarn link:workflow && cd example && yarn && echo "${{ secrets.OKTA_APP_ISSUER }}" > .env.local && yarn build - uses: FirebaseExtended/action-hosting-deploy@v0 with: entryPoint: './login-workflow' diff --git a/login-workflow/firebase.json b/login-workflow/firebase.json index 4618be3b..78a26c73 100644 --- a/login-workflow/firebase.json +++ b/login-workflow/firebase.json @@ -1,12 +1,16 @@ { - "hosting": { - "public": "example/build", - "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], - "rewrites": [ - { - "source": "**", - "destination": "/index.html" - } - ] - } + "hosting": { + "public": "example/build", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } }