Merge pull request #781 from PaloAltoNetworks/DOCS-6603_minorpabupdate #444
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
name: Deploy Live | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
if: github.repository_owner == 'PaloAltoNetworks' | |
name: Build | |
runs-on: pan-dev-runner-xl | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
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 | |
- name: Build site | |
run: REACT_APP_ERROR_REPORTER_APIKEY=${{ secrets.ERROR_REPORTER_APIKEY }} REACT_APP_FIREBASE_APIKEY=${{ secrets.FIREBASE_APIKEY }} REACT_APP_RECAPTCHA_APIKEY=${{ secrets.RECAPTCHA_APIKEY }} yarn build-github && zip -r build.zip build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: build | |
path: build.zip | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: pan-dev-runner-lg | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'yarn' | |
- uses: actions/download-artifact@v4 | |
with: | |
name: build | |
- name: Unzip build artifact | |
run: unzip build.zip | |
- name: Deploy to Firebase | |
id: deploy_live | |
uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2 # v0.7.1 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_PAN_DEV_F1B58 }}' | |
projectId: pan-dev-f1b58 | |
channelId: live | |
env: | |
FIREBASE_CLI_PREVIEWS: hostingchannels |