Skip to content

Commit

Permalink
fix(ci): trigger website build
Browse files Browse the repository at this point in the history
  • Loading branch information
FabrizioCafolla committed Jun 2, 2024
1 parent 7970df2 commit 609f5d5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ on:
schedule:
- cron: "0 9 15 * *" # every 15th of the month at 9:00 AM UTC
workflow_dispatch:
inputs:
with_analytics:
description: "Render awesome data with analytics"
required: false
default: "true"

jobs:
render-data:
Expand All @@ -37,12 +42,12 @@ jobs:
make setup-ci
- name: Render awesome data
if: github.event_name == 'push'
if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && github.event.inputs.with_analytics == 'false')
run: |
make release ARGS=--without-analytics
- name: Render awesome with analytics data
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.with_analytics == 'true')
env:
TOKEN_GITHUB_PUBLIC_API: ${{ secrets.TOKEN_GITHUB_PUBLIC_API }}
run: |
Expand All @@ -68,12 +73,17 @@ jobs:
retries: 3
script: |
const owner = 'italia-opensource';
const repo = 'italia-opensource-website';
const event_type = 'deployment';
const repo = 'italiaopensource.com';
const event_type = 'sync-database';
const ref = 'main';
const client_payload = {
"hash": "${{ github.sha }}",
"run_id": "${{ github.run_id }}",
};
github.rest.repos.createDispatchEvent({
owner,
repo,
event_type
event_type,
client_payload
});

0 comments on commit 609f5d5

Please sign in to comment.