api.yml 961 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: Update API Data
  2. on:
  3. push:
  4. branches:
  5. - master
  6. paths:
  7. - 'keyboards/**'
  8. - 'layouts/community/**'
  9. jobs:
  10. api_data:
  11. runs-on: ubuntu-latest
  12. container: qmkfm/base_container
  13. # protect against those who develop with their fork on master
  14. if: github.repository == 'qmk/qmk_firmware'
  15. steps:
  16. - uses: actions/checkout@v2
  17. with:
  18. fetch-depth: 1
  19. persist-credentials: false
  20. - name: Generate API Data
  21. run: qmk generate-api
  22. - name: Install rsync
  23. run: |
  24. apt-get update && apt-get install -y rsync
  25. - name: Upload API Data
  26. uses: JamesIves/github-pages-deploy-action@3.7.1
  27. with:
  28. ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
  29. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  30. BRANCH: main
  31. FOLDER: api_data/v1
  32. CLEAN: true
  33. GIT_CONFIG_EMAIL: hello@qmk.fm
  34. REPOSITORY_NAME: qmk/qmk_keyboards
  35. TARGET_FOLDER: v1