publish post #656
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: publish post | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "5 1,5,9,13 * * *" | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v7 | |
| with: | |
| submodules: true | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| version: "latest" | |
| - name: Install dependencies | |
| run: | | |
| uv --version | |
| uv sync --no-dev | |
| - name: Build | |
| run: | | |
| export GOOGLE_ANALYTICS=${{ secrets.GOOGLE_ANALYTICS }} | |
| export UTTERANCES_REPO=${{ github.repository }} | |
| uv run inv build-publish | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_branch: gh-pages | |
| publish_dir: ./output | |
| user_name: "github-actions[bot]" | |
| user_email: "github-actions[bot]@users.noreply.github.com" |