update-sources.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. name: update-sources
  2. on:
  3. push:
  4. branches:
  5. - master
  6. jobs:
  7. update-sources:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v4
  11. - name: Install GNU Global
  12. run: sudo apt-get install -y global exuberant-ctags python3-pygments
  13. - name: Checkout source repo
  14. uses: actions/checkout@v4
  15. with:
  16. repository: MidnightCommander/source
  17. path: HTML
  18. ref: gh-pages
  19. ssh-key: ${{ secrets.SOURCE_DEPLOY_KEY }}
  20. - name: Create sources index
  21. run: |
  22. pushd HTML
  23. git rm -rf *
  24. popd
  25. gtags
  26. htags --suggest -t "Welcome to the Midnight Commander source tour!"
  27. ./maint/htagsfix
  28. - name: Deploy to GitHub
  29. run: |
  30. cd HTML
  31. touch .nojekyll
  32. echo "source.midnight-commander.org" > CNAME
  33. git config user.name "GitHub Actions"
  34. git config user.email "github@midnight-commander.org"
  35. git add .
  36. git commit -m "Deploy to GitHub Pages"
  37. git push --force-with-lease