Skip to content

Commit

Permalink
update the way the documentation are deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
takase1121 committed Dec 1, 2024
1 parent cc3d1d7 commit 03b52b1
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@ name: Deploy site

on: { push: { branches: [master] } }

permissions:
contents: write

jobs:

version:
runs-on: ubuntu-latest
outputs:
lxl: ${{ steps.version.outputs.lxl }}
outputs: { lxl: ${{ steps.version.outputs.lxl }} }
steps:

- name: Get Lite XL version
id: version
env:
GH_TOKEN: ${{ github.token }}
env: { GH_TOKEN: ${{ github.token }} }
run: echo "lxl=$(gh -R lite-xl/lite-xl release list --exclude-drafts --exclude-pre-releases --limit 1 --json tagName --jq .[].tagName)" >> "$GITHUB_OUTPUT"

generate_keymap:
Expand All @@ -25,11 +21,10 @@ jobs:
permissions:
contents: write
pull-requests: write

with:
lite_xl_version: ${{ needs.version.outputs.lxl }}

deploy:
build:
runs-on: ubuntu-latest
needs: [version, generate_keymap]
steps:
Expand Down Expand Up @@ -71,8 +66,28 @@ jobs:
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
- name: Build
env:
CARDS: 'true'
LITE_XL_VERSION: ${{ needs.version.outputs.lxl }}
run: uv run mkdocs gh-deploy --force
run: uv run mkdocs build

- name: Upload page artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with: { path: site }

deploy:
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 03b52b1

Please sign in to comment.