Skip to content

Commit

Permalink
Revert "Revert "Publish documentation using the GitHub App"" (#856)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbaldry authored Sep 30, 2024
1 parent bb52821 commit bbb7430
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions publish-technical-documentation/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,23 @@ runs:
- id: get-secrets
uses: grafana/shared-workflows/actions/get-vault-secrets@main
with:
# sync-token and publish-token are fine-grained GitHub Personal Access Tokens that expire.
# They must be updated in the grafanabot GitHub account.
# A Vault admin can add them the ci/common/docs-team/website Vault path.
common_secrets: |
WEBSITE_SYNC_TOKEN=docs-team/website:sync-token
PUBLISH_TO_WEBSITE_TOKEN=docs-team/website:publish-token
PUBLISH_TECHNICAL_DOCUMENTATION_APP_ID=docs-team/publish-technical-documentation:app-id
PUBLISH_TECHNICAL_DOCUMENTATION_PRIVATE_KEY=docs-team/publish-technical-documentation:key
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ env.PUBLISH_TECHNICAL_DOCUMENTATION_APP_ID }}
owner: grafana
private-key: ${{ env.PUBLISH_TECHNICAL_DOCUMENTATION_PRIVATE_KEY }}

- name: Checkout sync action
uses: actions/checkout@v4
with:
path: .github/actions/website-sync
repository: grafana/website-sync
token: ${{ env.WEBSITE_SYNC_TOKEN }}
token: ${{ steps.app-token.outputs.token }}

- name: Sync to the website repository
uses: ./.github/actions/website-sync
Expand All @@ -48,6 +52,6 @@ runs:
repository: grafana/website
branch: master
host: github.com
github_pat: grafanabot:${{ env.PUBLISH_TO_WEBSITE_TOKEN }}
github_pat: grafanabot:${{ steps.app-token.outputs.token }}
source_folder: ${{ inputs.source_directory }}
target_folder: ${{ inputs.website_directory }}

0 comments on commit bbb7430

Please sign in to comment.