docs.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. name: Deploy Docs
  2. on:
  3. push:
  4. branches:
  5. - main
  6. jobs:
  7. deploy:
  8. runs-on: ubuntu-18.04
  9. steps:
  10. - uses: actions/checkout@v2
  11. with:
  12. fetch-depth: 0
  13. - name: Setup Go
  14. uses: actions/setup-go@v2
  15. with:
  16. go-version: ${{ env.GO_VERSION }}
  17. - name: Find the Go Cache
  18. id: go
  19. run: |
  20. echo "::set-output name=build-cache::$(go env GOCACHE)"
  21. echo "::set-output name=mod-cache::$(go env GOMODCACHE)"
  22. - name: Cache the Go Build Cache
  23. uses: actions/cache@v2.1.5
  24. with:
  25. path: ${{ steps.go.outputs.build-cache }}
  26. key: ${{ runner.os }}-build-check-diff-${{ hashFiles('**/go.sum') }}
  27. restore-keys: ${{ runner.os }}-build-check-diff-
  28. - name: Cache Go Dependencies
  29. uses: actions/cache@v2.1.5
  30. with:
  31. path: ${{ steps.go.outputs.mod-cache }}
  32. key: ${{ runner.os }}-pkg-${{ hashFiles('**/go.sum') }}
  33. restore-keys: ${{ runner.os }}-pkg-
  34. - name: Build Docs
  35. run: make docs
  36. # we can not use peaceiris/actions-gh-pages as it would override helm index
  37. - name: Deploy Docs
  38. env:
  39. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  40. CNAME: external-secrets.io
  41. run: .github/actions/docs/push.sh