Move language spec upload from Github actions to cloud build: Add cloudbuild.yaml #218
This file contains hidden or 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: Dart CI | |
on: | |
# Run on PRs and pushes to the default branch. | |
push: | |
branches: [ main ] | |
paths: | |
- 'specification/**' | |
- '.github/workflows/spec.yml' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'specification/**' | |
- '.github/workflows/spec.yml' | |
jobs: | |
specification: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
- name: Install latex tools | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install \ | |
texlive-latex-base \ | |
texlive-latex-extra \ | |
texlive-fonts-recommended \ | |
lmodern | |
- name: Build specification | |
run: | | |
cd specification | |
make | |
mkdir firebase | |
cp dartLangSpec.pdf firebase/DartLangSpecDraft.pdf | |
- name: Upload specification | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
uses: FirebaseExtended/action-hosting-deploy@0cbcac4740c2bfb00d632f0b863b57713124eb5a | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DART_SPECIFICATION }}' | |
projectId: dart-specification | |
entryPoint: specification/ | |
channelId: ${{ github.event_name == 'push' && 'live' || '' }} |