Skip to content

Trigger slack notification workflow in theme repo #574

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 24 additions & 3 deletions .github/workflows/build-push.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: Build and deploy (docs)
on:
repository_dispatch:
types: [trigger-preview-build]
workflow_call:
inputs:
environment:
Expand Down Expand Up @@ -39,14 +41,14 @@ on:
env:
FRONT_DOOR_USERNAME: ${{ secrets.FRONT_DOOR_USERNAME }}
FRONT_DOOR_PASSWORD: ${{ secrets.FRONT_DOOR_PASSWORD }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
jobs:
prod-check-branch:
runs-on: ubuntu-24.04
steps:
- name: Output variables
run: |
echo "Environment: ${{ inputs.environment }}"
echo "Environment: ${{ inputs.environment || github.event.client_payload.environment }}"
echo "Branch: ${{ github.ref }}"
- name: Checks to see that main branch is selected if deploying to prod
if: ${{ inputs.environment == 'prod' && github.ref != 'refs/heads/main' }}
Expand All @@ -63,14 +65,33 @@ jobs:
docs_source_path: "public"
docs_build_path: "./"
doc_type: "hugo"
environment: ${{inputs.environment}}
environment: ${{ inputs.environment || github.event.client_payload.environment }}
force_hugo_theme_version: ${{inputs.hugo_theme_override}}
auto_deploy_branch: "main"
auto_deploy_env: "prod"
secrets:
AZURE_CREDENTIALS: ${{secrets.AZURE_CREDENTIALS_DOCS}}
AZURE_KEY_VAULT: ${{secrets.AZURE_KEY_VAULT_DOCS}}

trigger-theme-slack-notification:
if: github.event_name == 'repository_dispatch'
needs: call-docs-build-push
runs-on: ubuntu-latest
permissions: read-all
steps:
- name: Trigger 'Slack notification for new theme release' workflow in 'nginx-hugo-theme' repo.
run: |
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.F5_CLA_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"https://api.github.com/repos/${{ secrets.OWNER }}/${{ secrets.REPO }}/dispatches" \
-d "{"event_type": "trigger-slack-notification", "client_payload": {"previewURL": "${{ env.PREVIEW_URL }}", "author": "${{ github.event.client_payload.author}}", "tag_name": "${{ github.event.client_payload.tag_name }}", "release_name": "${{ github.event.client_payload.release_name }}"}}"
env:
PREVIEW_URL: ${{ needs.call-docs-build-push.outputs.PREVIEW_URL }}


lighthouseci:
if: github.event.pull_request
needs: call-docs-build-push
Expand Down
99 changes: 0 additions & 99 deletions layouts/redoc/single.html

This file was deleted.

Loading