File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed
Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update Crowdin API Docs
2+
3+ on :
4+ schedule :
5+ - cron : ' 0 12 * * *' # Run every day at 12:00 UTC
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : write
10+ pull-requests : write
11+
12+ jobs :
13+ update-api-docs :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - uses : actions/checkout@v4
18+
19+ - name : Download Crowdin API docs
20+ run : |
21+ curl -o src/assets/api/crowdin/file-based.yml https://api.crowdin.com/api/docs/rest/file-based.yaml
22+ curl -o src/assets/api/enterprise/file-based.yml https://enterprise.api.crowdin.com/api/docs/rest/file-based.yaml
23+ curl -o src/assets/api/crowdin/string-based.yml https://api.crowdin.com/api/docs/rest/string-based.yaml
24+ curl -o src/assets/api/enterprise/string-based.yml https://enterprise.api.crowdin.com/api/docs/rest/string-based.yaml
25+
26+ - name : Check for changes
27+ id : check_changes
28+ run : |
29+ git diff --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
30+
31+ - name : Create Pull Request
32+ if : steps.check_changes.outputs.changes == 'true'
33+ uses : peter-evans/create-pull-request@v7
34+ with :
35+ token : ${{ secrets.GITHUB_TOKEN }}
36+ commit-message : " chore(developer): update API docs"
37+ title : " chore(developer): update API docs"
38+ body : This automated PR updates the Crowdin API documentation files.
39+ branch : update-crowdin-api-docs
40+ base : main
You can’t perform that action at this time.
0 commit comments