diff --git a/.github/workflows/generate-library.yml b/.github/workflows/generate-library.yml index 0d80524a5..e63d1c3c2 100644 --- a/.github/workflows/generate-library.yml +++ b/.github/workflows/generate-library.yml @@ -29,6 +29,7 @@ jobs: components: name: Components runs-on: ubuntu-latest + environment: generate steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -71,9 +72,17 @@ jobs: tag: v0.18.0 cache: enable + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: cloudposse + - name: Render Documentation for Terraform Components env: - PUBLIC_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + PUBLIC_REPO_ACCESS_TOKEN: ${{ steps.generate-token.outputs.token }} run: ./scripts/render-docs-for-components.sh - name: Upload Components Docs @@ -86,6 +95,7 @@ jobs: modules: name: Modules runs-on: ubuntu-latest + environment: generate steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -120,9 +130,17 @@ jobs: tag: v0.18.0 cache: enable + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: cloudposse + - name: Render Documentation for Terraform Modules env: - PUBLIC_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + PUBLIC_REPO_ACCESS_TOKEN: ${{ steps.generate-token.outputs.token }} run: ./scripts/render-docs-for-modules.sh - name: Upload Modules Docs @@ -135,6 +153,7 @@ jobs: github-actions: name: GitHub Actions runs-on: ubuntu-latest + environment: generate steps: - name: Checkout Repository uses: actions/checkout@v4 @@ -169,9 +188,17 @@ jobs: tag: v0.18.0 cache: enable + - name: Generate a token + id: generate-token + uses: actions/create-github-app-token@v1 + with: + app-id: ${{ vars.APP_ID }} + private-key: ${{ secrets.APP_PRIVATE_KEY }} + owner: cloudposse + - name: Render Documentation for GitHub Actions env: - PUBLIC_REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + PUBLIC_REPO_ACCESS_TOKEN: ${{ steps.generate-token.outputs.token }} run: ./scripts/render-docs-for-github-actions.sh - name: Upload GitHub Actions Docs