docs-deploy.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. name: Docs deploy
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: ["main"]
  6. permissions:
  7. contents: read
  8. packages: write
  9. attestations: write
  10. id-token: write
  11. jobs:
  12. build:
  13. if: github.repository == 'TecharoHQ/anubis'
  14. runs-on: ubuntu-24.04
  15. steps:
  16. - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
  17. with:
  18. persist-credentials: false
  19. - name: Set up Docker Buildx
  20. uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
  21. - name: Log into registry
  22. uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
  23. with:
  24. registry: ghcr.io
  25. username: techarohq
  26. password: ${{ secrets.GITHUB_TOKEN }}
  27. - name: Docker meta
  28. id: meta
  29. uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
  30. with:
  31. images: ghcr.io/techarohq/anubis/docs
  32. tags: |
  33. type=sha,enable=true,priority=100,prefix=,suffix=,format=long
  34. main
  35. - name: Build and push
  36. id: build
  37. uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
  38. with:
  39. context: ./docs
  40. cache-to: type=gha
  41. cache-from: type=gha
  42. tags: ${{ steps.meta.outputs.tags }}
  43. labels: ${{ steps.meta.outputs.labels }}
  44. platforms: linux/amd64
  45. push: true
  46. - name: Apply k8s manifests to limsa lominsa
  47. uses: actions-hub/kubectl@3ece3793e7a9fe94effe257d03ac834c815ea87d # v1.35.1
  48. env:
  49. KUBE_CONFIG: ${{ secrets.LIMSA_LOMINSA_KUBECONFIG }}
  50. with:
  51. args: apply -k docs/manifest
  52. - name: Apply k8s manifests to limsa lominsa
  53. uses: actions-hub/kubectl@3ece3793e7a9fe94effe257d03ac834c815ea87d # v1.35.1
  54. env:
  55. KUBE_CONFIG: ${{ secrets.LIMSA_LOMINSA_KUBECONFIG }}
  56. with:
  57. args: rollout restart -n default deploy/anubis-docs