publish-docs.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. name: Publish Carbon Documentation
  5. on:
  6. push:
  7. branches:
  8. - trunk
  9. jobs:
  10. build:
  11. if: github.repository == 'carbon-language/carbon-lang'
  12. runs-on: [ubuntu-latest]
  13. steps:
  14. - uses: actions/checkout@v2
  15. - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
  16. with:
  17. version: '285.0.0'
  18. project_id: ${{ secrets.GCP_PROJECT_ID }}
  19. service_account_email: ${{ secrets.GCP_SA_EMAIL }}
  20. service_account_key: ${{ secrets.GCP_SA_KEY }}
  21. export_default_credentials: true
  22. - uses: actions/setup-ruby@v1
  23. with:
  24. ruby-version: 2.6
  25. - run: gcloud info
  26. - name: Install bundler
  27. run: gem install bundler
  28. working-directory: website/jekyll
  29. - name: Install jekyll and dependencies
  30. run: bundle install --jobs 4 --retry 3
  31. working-directory: website/jekyll
  32. - name: Build HTML pages
  33. run: make build
  34. working-directory: website/jekyll
  35. - name: Publish to www.carbon-lang.dev
  36. run: gsutil cp -R website/jekyll/build/site/* gs://www.carbon-lang.dev/