♻️ Move docs to Cloudflare #161
This file contains 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: build | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Checkout lndocs | |
uses: actions/checkout@v3 | |
with: | |
repository: laminlabs/lndocs | |
ssh-key: ${{ secrets.READ_LNDOCS }} | |
path: lndocs | |
ref: main | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: ".github/workflows/build.yml" # See dependencies below | |
- name: Cache pre-commit | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -U laminci | |
- run: nox -s lint | |
if: matrix.python-version == '3.9' | |
- run: nox -s build | |
- name: Codecov | |
if: matrix.python-version == '3.9' | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- uses: cloudflare/pages-action@v1 | |
id: cloudflare | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 472bdad691b4483dea759eadb37110bd | |
projectName: readfcs | |
directory: "_build/html" | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
wranglerVersion: "3" |