This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
fix: replace dAPI addresses with reference to new docs #1584
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 to Firebase Hosting | |
on: | |
push: | |
pull_request: | |
jobs: | |
build_and_preview: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
cache: 'yarn' | |
- run: yarn install | |
- run: npm run docs:build | |
- name: Generate site name from branch | |
shell: bash | |
run: ruby -e 'puts "::set-output name=branch_name::#{`git branch --show-current`.chomp.gsub(/[^a-zA-Z\d]/){"-"}.downcase}"' | |
id: get_branch | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SA_API3_DOCS }}' | |
expires: 7d | |
channelId: ${{ steps.get_branch.outputs.branch_name }} | |
firebaseToolsVersion: '11.30.0' | |
id: firebase_deploy | |
- uses: actions/github-script@v6 | |
name: Comment on commit | |
if: ${{ github.event_name == 'push' }} | |
with: | |
script: | | |
github.rest.repos.createCommitComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
commit_sha: context.sha, | |
body: 'Preview site: ${{ steps.firebase_deploy.outputs.details_url }}' | |
}) |