Skip to content

Bump @docsearch/react from 4.6.2 to 4.6.3 (#1243) #763

Bump @docsearch/react from 4.6.2 to 4.6.3 (#1243)

Bump @docsearch/react from 4.6.2 to 4.6.3 (#1243) #763

Workflow file for this run

name: Deploy Live
on:
push:
branches: [ master ]
workflow_dispatch:
permissions: {}
concurrency:
group: deploy-live
cancel-in-progress: false
jobs:
build:
if: github.repository_owner == 'PaloAltoNetworks' && github.ref == 'refs/heads/master'
name: Build
runs-on: pan-dev-runner-xl
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
cache: 'yarn'
- name: Get yarn cache
id: yarn-cache
run: echo "YARN_CACHE_DIR=$(yarn cache dir)" >> "${GITHUB_OUTPUT}"
# - name: Cache dependencies
# uses: actions/cache@v4
# with:
# path: ${{ steps.yarn-cache.outputs.YARN_CACHE_DIR }}
# key: ${{ runner.os }}-pandev-${{ hashFiles('**/yarn.lock') }}
# restore-keys: |
# ${{ runner.os }}-pandev-
# - name: Cache docusaurus build
# uses: actions/cache@v4
# with:
# path: node_modules/.cache/webpack
# key: pandev-live-${{ github.run_id }}
# restore-keys: |
# pandev-live
- name: Install dependencies
run: yarn --prefer-offline --frozen-lockfile --ignore-scripts
# needed for fetching Hashicorp blog feed
- name: Cache Playwright
id: playwright-cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-master-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-playwright-master-
- name: Install Playwright
if: steps.playwright-cache.outputs.cache-hit != 'true'
run: |
npx playwright install chromium
npx playwright install-deps chromium
- name: Build site
run: |
FEED_SOFT_FAIL=1 FEED_DEBUG=1 yarn build-github
rm -f build.zip
zip -r build.zip build
env:
REACT_APP_ERROR_REPORTER_APIKEY: ${{ secrets.ERROR_REPORTER_APIKEY }}
- name: Verify build did not modify critical files
run: |
git diff --exit-code -- \
firebase.json .firebaserc package.json yarn.lock docusaurus.config.ts \
'scripts/**' '.github/**' 'src/theme/**' 'plugin-sitemap-coveo/**'
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: build
path: build.zip
deploy:
name: Deploy
needs: build
if: github.repository_owner == 'PaloAltoNetworks' && github.ref == 'refs/heads/master'
runs-on: pan-dev-runner-lg
environment: production
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: '20'
cache: 'yarn'
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: build
- name: Unzip build artifact
run: unzip -n build.zip 'build/*'
- name: Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0
with:
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
service_account: ${{ secrets.WIF_SERVICE_ACCOUNT }}
export_environment_variables: false
- name: Mask sensitive values in logs
run: |
echo "::add-mask::${{ steps.auth.outputs.credentials_file_path }}"
echo "::add-mask::${{ secrets.GCP_PROJECT_NUMBER }}"
- name: Read GCP credentials
id: creds
run: |
creds=$(cat "${{ steps.auth.outputs.credentials_file_path }}")
echo "::add-mask::$creds"
echo "sa_key=$creds" >> "$GITHUB_OUTPUT"
- name: Deploy to Firebase
id: deploy_live
uses: FirebaseExtended/action-hosting-deploy@e2eda2e106cfa35cdbcf4ac9ddaf6c4756df2c8c # v0.10.0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: "${{ steps.creds.outputs.sa_key }}"
projectId: ${{ secrets.FIREBASE_PROJECT_ID }}
channelId: live
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true