Deploy wiki #24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy wiki | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'wiki/*' | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.head_ref != '' }} | |
| jobs: | |
| deploy: | |
| name: Deploy wiki | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: true | |
| - name: Deploy | |
| run: | | |
| find . -maxdepth 1 -type f -delete | |
| mv wiki/* ./ | |
| find . -maxdepth 1 -type d ! -name '.' ! -name '.git' -exec rm -r {} + | |
| git config user.name "qbt_search-plugins_bot" | |
| git config user.email "[email protected]" | |
| git checkout --orphan tmp | |
| git add -A | |
| git commit -m "Import" | |
| git branch -D master | |
| git branch -m master | |
| git push https://github.com/qbittorrent/search-plugins.wiki.git --force |