Skip to content

πŸ‘· Deploy with Cloudflare #148

πŸ‘· Deploy with Cloudflare

πŸ‘· Deploy with Cloudflare #148

Workflow file for this run

name: build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: cache pre-commit
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}
- run: pip install -U laminci
- run: pip install "lndocs[blog]@git+https://x-access-token:${{ secrets.LAMIN_BUILD_DOCS }}@github.com/laminlabs/lndocs"
# - run: nox -s lint
- run: nox -s build
- uses: cloudflare/wrangler-action@v3
id: cloudflare
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: 472bdad691b4483dea759eadb37110bd
command: pages deploy "_build/html" --project-name=lamin-blog
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: edumserrano/find-create-or-update-comment@v2
if: github.event_name == 'pull_request'
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: "Deployment URL"
comment-author: "github-actions[bot]"
body: |
Deployment URL: ${{ steps.cloudflare.outputs.deployment-url }}
edit-mode: replace