deploy #2
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 | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'docs/**' | |
| - 'static/**' | |
| - 'src/**' | |
| - 'docusaurus.config.ts' | |
| - 'sidebars.ts' | |
| - 'package.json' | |
| - 'package-lock.json' | |
| - '.github/workflows/deploy.yml' | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: docs-deploy | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| name: SSH deploy to self-hosted Docusaurus | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Trigger build + rsync on origin host | |
| uses: appleboy/ssh-action@v1.2.0 | |
| with: | |
| host: ${{ secrets.DEPLOY_HOST }} | |
| username: ${{ secrets.DEPLOY_USER }} | |
| key: ${{ secrets.DEPLOY_KEY }} | |
| port: ${{ secrets.DEPLOY_PORT || 22 }} | |
| # The SSH key on the origin host carries a forced-command | |
| # restriction in authorized_keys, so this script string is | |
| # ignored — the host runs its pinned deploy.sh and only that. | |
| # The argument below is a no-op kept for log clarity. | |
| script: 'noop' | |
| script_stop: true |