-
Notifications
You must be signed in to change notification settings - Fork 25
33 lines (33 loc) · 1.1 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
name: Build Docs
on:
repository_dispatch:
types:
- plugins-updated
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- run: |
sudo apt install jq curl -y
rm vitepress/plugins.json
wget https://raw.githubusercontent.com/pot-app/pot-app-plugin-list/main/list.json -O vitepress/plugins.json
ver=$(curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" -s https://api.github.com/repos/pot-app/pot-desktop/releases/latest | jq '.tag_name'|tr -d 'v"')
sed -i "s/const version =.*/const version = '${ver}'/" vitepress/download.md
sed -i "s/const version =.*/const version = '${ver}'/" vitepress/en/download.md
- run: pnpm i && pnpm docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./vitepress/.vitepress/dist