Skip to content

Commit

Permalink
Deploy docs of latest version to docs.slint.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
aurindam authored Sep 30, 2024
1 parent 7f08ea3 commit 735e22f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/deploy-releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,33 @@ name: Deploy to releases.slint.dev
on:
push:
paths: 'releases/**'

workflow_dispatch:

jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./releases
outputs:
version: ${{ steps.identify-version.outputs.version }}
version: ${{ steps.identify-version.outputs.VERSION }}
steps:
- name: Repository Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
releases
- name: Identify Version
id: identify-version
run: |
echo "version=$(sed -n '1p' ./releases/versions.txt)" >> "$GITHUB_OUTPUT"
version=$(sed -n '1p' versions.txt)
echo "VERSION=$version" >> "$GITHUB_OUTPUT"
- name: Copy latest release to docs
run: |
rsync -ua ${{ steps.identify-version.outputs.VERSION }} docs
cp versions.txt docs
- name: npm install
run: |
Expand Down Expand Up @@ -53,7 +60,9 @@ jobs:
- name: Copy docs.html and 404.html
run: |
cp website/output/docs.html index.html
cp website/output/docs.html docs/index.html
cp website/output/404.html 404.html
cp website/output/404.html docs/404.html
rm -rf website
- name: Install Netlify
Expand All @@ -80,7 +89,6 @@ jobs:
- name: Publish latest release to docs
run: |
rsync -ua ${{ steps.identify-version.outputs.version }} docs
cd docs && npx wrangler@3 pages deploy . --project-name=docs --commit-dirty=true
scrape-docs:
Expand Down
9 changes: 5 additions & 4 deletions releases/_redirects
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
/releases/* /:splat
/:version/docs/quickstart/:language qs=:qs /:version/docs/:qs/:language
/1.0.2/docs/nodejs/* /1.0.2/docs/node/:splat
/latest/* /1.8.0/:splat
/demos/* /1.8.0/demos/:splat
/docs/* /1.8.0/docs/:splat
/editor/* /1.8.0/editor/:splat
/1.8.0/* https://docs.slint.dev/1.8.0/:splat
/latest/* https://docs.slint.dev/1.8.0/:splat
/demos/* https://docs.slint.dev/1.8.0/demos/:splat
/docs/* https://docs.slint.dev/1.8.0/docs/:splat
/editor/* https://docs.slint.dev/1.8.0/editor/:splat
/master/* https://snapshots.slint.dev/master/:splat
/docs/rust/sixtyfps/* /docs/rust/slint/:splat
/docs/rust/sixtyfps_interpreter/* /docs/rust/slint/:splat
Expand Down

0 comments on commit 735e22f

Please sign in to comment.