Skip to content

fix gh cli not getting a token #82

fix gh cli not getting a token

fix gh cli not getting a token #82

Workflow file for this run

name: Deploy site
on: { push: { branches: [master] } }
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# needed for accurate dates
fetch-depth: 0
# environment has these deps.
# - name: Install dependencies
# run: sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install Python
uses: actions/setup-python@v5
with:
python-version-file: pyproject.toml
- name: Cache build data
uses: actions/cache@v4
with:
key: mkdocs-cache-${{ runner.os }}-${{ hashFiles('**/poetry.lock', '**/mkdocs.yml') }}
path: .cache
- name: Setup environment variables
env:
GH_TOKEN: ${{ github.token }}
run:
echo "LITE_XL_VERSION=$(gh -R lite-xl/lite-xl release list --exclude-drafts --exclude-pre-releases --limit 1 --json tagName --jq .[].tagName)" >> $GITHUB_ENV
echo "SITE_URL=https://${GITHUB_REPOSITORY%/*}.github.io/${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
echo "REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" >> $GITHUB_ENV
- name: Build and deploy
env: { CARDS: 'true' }
run: uv run mkdocs gh-deploy --force