From 5c8ef2d08012f7c5189ce63727fc79d3557d79c5 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 15 Sep 2023 10:31:31 -0700 Subject: [PATCH] update the specification validation workflow --- .github/workflows/{ci.yml => spec.yml} | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) rename .github/workflows/{ci.yml => spec.yml} (73%) diff --git a/.github/workflows/ci.yml b/.github/workflows/spec.yml similarity index 73% rename from .github/workflows/ci.yml rename to .github/workflows/spec.yml index 1f7135c3fb..986340a220 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/spec.yml @@ -1,4 +1,4 @@ -name: CI +name: Spec on: # Run on PRs and pushes to the default branch. @@ -6,27 +6,20 @@ on: branches: [ main ] paths: - 'specification/**' - - '.github/workflows/ci.yml' + - '.github/workflows/spec.yml' pull_request: branches: [ main ] paths: - 'specification/**' - - '.github/workflows/ci.yml' + - '.github/workflows/spec.yml' jobs: specification: runs-on: ubuntu-latest - if: | - ( - (github.event_name == 'push' - && github.ref == 'refs/heads/main' - && github.repository == 'dart-lang/language' - ) || - (github.event.pull_request.head.repo.full_name == github.repository) - ) steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - name: Install latex tools run: | sudo apt-get update -qq @@ -35,13 +28,17 @@ jobs: texlive-latex-extra \ texlive-fonts-recommended \ lmodern + - name: Build specification run: | cd specification make mkdir firebase cp dartLangSpec.pdf firebase/DartLangSpecDraft.pdf - - uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2 + + - name: Upload specification + if: ${{ github.event.pull_request.merged }} + uses: FirebaseExtended/action-hosting-deploy@120e124148ab7016bec2374e5050f15051255ba2 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DART_SPECIFICATION }}'