publish-docs.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. name: Publish Carbon Documentation
  2. on:
  3. push:
  4. branches:
  5. - trunk
  6. jobs:
  7. build:
  8. if: github.repository == 'carbon-language/carbon-lang'
  9. runs-on: [ubuntu-latest]
  10. steps:
  11. - uses: actions/checkout@v2
  12. - uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
  13. with:
  14. version: '285.0.0'
  15. project_id: ${{ secrets.GCP_PROJECT_ID }}
  16. service_account_email: ${{ secrets.GCP_SA_EMAIL }}
  17. service_account_key: ${{ secrets.GCP_SA_KEY }}
  18. export_default_credentials: true
  19. - uses: actions/setup-ruby@v1
  20. with:
  21. ruby-version: 2.6
  22. - run: gcloud info
  23. - name: Install bundler
  24. run: gem install bundler
  25. working-directory: src/jekyll
  26. - name: Install jekyll and dependencies
  27. run: bundle install --jobs 4 --retry 3
  28. working-directory: src/jekyll
  29. - name: Build HTML pages
  30. run: make build
  31. working-directory: src/jekyll
  32. - name: Publish to www.carbon-lang.dev
  33. run: gsutil cp -R src/jekyll/.gen-site/* gs://www.carbon-lang.dev/