Bump protobufjs and google-gax #892
Workflow file for this run
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 PR to Firebase | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
workflow_dispatch: | |
inputs: | |
prNumber: | |
description: 'Number of the PR to deploy' | |
required: true | |
jobs: | |
deploy-dev-pr: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: false | |
- uses: actions/setup-node@v3.8.0 | |
with: | |
node-version: 16 | |
check-latest: true | |
cache: 'npm' | |
- name: Get Hugo Version | |
id: hugo-version | |
run: | | |
version=$(jq -r .hugo "scripts/.util/tools.json") | |
echo "version=${version#v}" >> "$GITHUB_OUTPUT" | |
- name: Checkout PR | |
if: github.event_name == 'workflow_dispatch' | |
run: | | |
gh pr checkout ${{ github.event.inputs.prNumber }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: ${{ steps.hugo-version.outputs.version }} | |
extended: true | |
- name: Install node Modules | |
run: npm ci | |
- name: Setup GCP Auth | |
id: auth | |
uses: google-github-actions/auth@v1 | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
- name: Setup GCloud | |
uses: google-github-actions/setup-gcloud@v1.1.1 | |
with: | |
export_default_credentials: true | |
- name: Disable Crawling on staging site | |
run: | | |
printf "User-agent: *\nDissallow: /\n" > layouts/robots.txt | |
- name: Build | |
run: hugo | |
- name: Switch Back to Original Branch # Built contents in /public is unaffected | |
if: github.event_name == 'workflow_dispatch' | |
run: git checkout - | |
- name: Deploy | |
id: deploy | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const deploy = require('./deploy.js') | |
await deploy({ expires: '72h' }) | |
- name: Comment with Staging Link (by PR number) | |
if: github.event_name == 'workflow_dispatch' | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
number: ${{ github.event.inputs.prNumber }} | |
message: | | |
PR deployed to: ${{ steps.deploy.outputs.staging_url }} | |
Expires at: ${{ steps.deploy.outputs.expiration }} | |
- name: Comment with Staging Link | |
if: github.event_name != 'workflow_dispatch' | |
uses: marocchino/sticky-pull-request-comment@v2 | |
with: | |
message: | | |
PR deployed to: ${{ steps.deploy.outputs.staging_url }} | |
Expires at: ${{ steps.deploy.outputs.expiration }} |