Add missing FIREBASE_CLI_EXPERIMENTS flag for Docs CD pipeline (#1351) #4
This file contains 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
# Copyright (c) 2022 Sharezone UG (haftungsbeschränkt) | |
# Licensed under the EUPL-1.2-or-later. | |
# | |
# You may obtain a copy of the Licence at: | |
# https://joinup.ec.europa.eu/software/page/eupl | |
# | |
# SPDX-License-Identifier: EUPL-1.2 | |
name: docs-cd | |
concurrency: | |
# Avoids running multiple deployments at the same time which would cause | |
# conflicts. | |
group: docs-release | |
on: | |
push: | |
branches: | |
- main | |
# Set permissions to none. | |
# | |
# Using the broad default permissions is considered a bad security practice | |
# and would cause alerts from our scanning tools. | |
permissions: {} | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
name: docs-deploy-${{ matrix.environment.flavor }} | |
permissions: | |
checks: write # for FirebaseExtended/action-hosting-deploy | |
strategy: | |
matrix: | |
environment: | |
- flavor: dev | |
projectId: sharezone-debug | |
serviceAccountSecret: FIREBASE_SERVICE_ACCOUNT_SHAREZONE_DEBUG | |
- flavor: prod | |
projectId: sharezone-c2bd8 | |
serviceAccountSecret: FIREBASE_HOSTING_PROD_KEY | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | |
- name: Install dependencies | |
run: npm install -C docs | |
# Our production docs should be indexed by search engines. | |
- name: Remove robots.txt | |
if: ${{ matrix.environment.flavor == 'prod' }} | |
run: rm -f docs/public/robots.txt | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets[matrix.environment.serviceAccountSecret] }}" | |
channelId: live | |
entryPoint: "./docs" | |
target: docs | |
projectId: ${{ matrix.environment.projectId }} | |
env: | |
# Required to deploy Next.js applications to Firebase Hosting | |
FIREBASE_CLI_EXPERIMENTS: webframeworks |