build: make build.sh the local mirror of CI #138
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 Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| permissions: | |
| contents: read | |
| # Deploys force-push to the published site, so queue them rather than | |
| # running two at once. Never cancel a deploy that is already pushing. | |
| concurrency: | |
| group: deploy-docs | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Checkout target repo | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| repository: poweradmin/poweradmin.github.io | |
| path: poweradmin.github.io | |
| token: ${{ secrets.DEPLOY_TOKEN }} | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: '3.13' | |
| cache: pip | |
| cache-dependency-path: requirements.txt | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Build and deploy | |
| run: | | |
| cd poweradmin.github.io | |
| mkdocs gh-deploy --strict --verbose --config-file ../mkdocs.yml --remote-branch master --force |