fix(ci): render template before running checks #33
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: Docs | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: astral-sh/setup-uv@94527f2e458b27549849d47d273a16bec83a01e9 # v7 | |
| with: | |
| version: "0.11.3" | |
| python-version: "3.12" | |
| - name: Configure git | |
| run: | | |
| git config --global user.name "CI" | |
| git config --global user.email "ci@test.com" | |
| - name: Render template | |
| run: | | |
| uvx copier copy . /tmp/rendered-project \ | |
| --trust \ | |
| --defaults \ | |
| --overwrite \ | |
| --vcs-ref HEAD \ | |
| --data project_name=my-test-project \ | |
| --data description="A test project" \ | |
| --data author_name="Test Author" \ | |
| --data author_email="test@example.com" \ | |
| --data github_user=test-user | |
| - name: Build docs | |
| working-directory: /tmp/rendered-project | |
| run: uv run mkdocs build | |
| - uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4 | |
| with: | |
| path: /tmp/rendered-project/site/ | |
| - id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5 |