Skip to content

Commit

Permalink
docs: generate video installers on the CI (#9)
Browse files Browse the repository at this point in the history
* chore: test pr preview_prs

* install vhs

* add ttyd

* add it from snap

* boom

* order matters sometimes

* path matters sometimes

* powers matters sometimes

* sometimes stupidy matters...

* meh

* mah

* booh
  • Loading branch information
puria authored Apr 16, 2024
1 parent 86d241f commit 7fb514a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,16 @@ jobs:
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- run: |
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo snap install ttyd --classic
sudo apt update && sudo apt install vhs ffmpeg
- run: make
working-directory: ./docs/installation_instructions
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy didroom docs preview
concurrency: preview-${{ github.ref }}

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: write
pages: write
id-token: write


jobs:
deploy-preview:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm # or pnpm / yarn
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci # or pnpm install / yarn install / bun install
- run: |
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo snap install ttyd --classic
sudo apt update && sudo apt install vhs ffmpeg
- run: make
working-directory: ./docs/installation_instructions
- name: Build with VitePress
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: docs/.vitepress/dist
preview-branch: main
umbrella-dir: docs/pr-preview

0 comments on commit 7fb514a

Please sign in to comment.