0.8 pending doc #37
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: PR Preview | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - reopened | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| concurrency: | |
| group: gh-pages | |
| queue: max | |
| jobs: | |
| preview: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| pip install poetry | |
| poetry install | |
| - name: Deploy Preview | |
| env: | |
| MKDOCS_PLUGINS: false | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| EDIT_BRANCH_URI: edit/${{ github.head_ref }}/docs/ | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # Deploy to a version named 'pr/{number}' | |
| poetry run mike deploy --push --deploy-prefix pr ${{ github.event.number }} | |
| echo "Preview available at: https://docs.advanced-peripherals.de/pr/${{ github.event.number }}/" | |
| - name: Post PR Comment | |
| uses: marocchino/sticky-pull-request-comment@v2 | |
| with: | |
| header: documentation-preview | |
| message: | | |
| ## 📝 Documentation Preview Ready! | |
| | Item | Details | | |
| | :--- | :--- | | |
| | **Status** | ✅ Deployed Successfully | | |
| | **Preview Link** | [View Documentation](https://docs.advanced-peripherals.de/pr/${{ github.event.number }}/) | | |
| | **Source Branch** | `${{ github.head_ref }}` | | |
| | **Version Alias** | `pr/${{ github.event.number }}` | | |
| > [!NOTE] | |
| > The **Edit** buttons on this preview link directly to your branch. Changes made there will update this preview after a few minutes. |