File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Documentation
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ paths :
8+ - " docs/**"
9+ - " README.md"
10+ - " CHANGELOG.md"
11+
12+ permissions :
13+ contents : read
14+
15+ jobs :
16+ sync-documentation :
17+ name : Sync Documentation to Website
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Get latest release version
26+ id : version
27+ run : |
28+ VERSION=$(gh release view --json tagName -q .tagName 2>/dev/null || echo "v0.0.0")
29+ echo "version=$VERSION" >> $GITHUB_OUTPUT
30+ env :
31+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32+
33+ - name : Generate GitHub App token
34+ id : generate_token
35+ uses : tibdex/github-app-token@v2
36+ with :
37+ app_id : ${{ secrets.APP_ID }}
38+ private_key : ${{ secrets.PRIVATE_KEY }}
39+
40+ - name : Trigger Website Documentation Sync
41+ uses : peter-evans/repository-dispatch@v3
42+ with :
43+ token : ${{ steps.generate_token.outputs.token }}
44+ repository : open-ev-data/open-ev-data.github.io
45+ event-type : sync-api-docs
46+ client-payload : |
47+ {
48+ "source": "api",
49+ "version": "${{ steps.version.outputs.version }}",
50+ "sha": "${{ github.sha }}",
51+ "ref": "${{ github.ref }}"
52+ }
You can’t perform that action at this time.
0 commit comments