From d16dbad2d74a992494ddcddbc6779b91993e5186 Mon Sep 17 00:00:00 2001 From: Dvel Date: Tue, 14 Jan 2025 22:20:49 +0800 Subject: [PATCH] feat: add GitHub Pages preview --- .github/workflows/pages.yml | 44 +++++++++++++++++++++++++++++++++++++ others/pages/index.html | 12 ++++++++++ 2 files changed, 56 insertions(+) create mode 100644 .github/workflows/pages.yml create mode 100644 others/pages/index.html diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..222b943 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,44 @@ +name: Deploy rime-ice with fcitx5-rime.js + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Build rime-ice + uses: rimeinn/deploy-schema@master + with: + user-recipe-list: |- + iDvel/rime-ice:others/recipes/full + shared-recipe-list: + package-items: |- + build + lua + opencc + custom_phrase.txt + + - name: Download fcitx5-rime.js + run: | + curl -L -o fcitx5-rime.tgz https://github.com/rimeinn/fcitx5-rime.js/releases/download/latest/fcitx5-rime.tgz + mkdir -p fcitx5-rime + tar -xzvf fcitx5-rime.tgz -C fcitx5-rime + + - name: Move files to publish directory + run: | + mkdir -p ./public/dist + mv /tmp/deploy-schema/artifact.zip ./public/rime-ice.zip + mv fcitx5-rime/package/dist/* ./public/dist + cp others/pages/index.html ./public/index.html + + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public diff --git a/others/pages/index.html b/others/pages/index.html new file mode 100644 index 0000000..290e3a2 --- /dev/null +++ b/others/pages/index.html @@ -0,0 +1,12 @@ + + + + + +

雾凇拼音

+ + +