Skip to content

Commit d89a124

Browse files
committed
CI: Add workflow to deploy documentation to GitHub Pages
1 parent 023a6d4 commit d89a124

File tree

5 files changed

+42
-4
lines changed

5 files changed

+42
-4
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy Demo Docs
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
deploy:
14+
runs-on: ubuntu-latest
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: '8.4'
24+
extensions: mbstring, intl, xml
25+
tools: composer:v2
26+
27+
- name: Install Dependencies
28+
run: composer install --prefer-dist --no-progress --no-dev
29+
30+
- name: Build Demo Site
31+
run: php bin/litedocs build
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./site
38+
force_orphan: true

docs/en/guide/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Here is a complete example of a configuration file:
88

99
```yaml
1010
site_name: "My Documentation"
11-
site_url: "[https://example.com](https://example.com)"
11+
site_url: "https://example.com"
1212

1313
# Directories
1414
docs_dir: "docs"

docs/en/guide/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can download the standalone executable directly. This is the easiest way to
1414

1515
```bash
1616
# Download the latest release
17-
wget [https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar](https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar)
17+
wget https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar
1818

1919
# Make it executable
2020
chmod +x litedocs.phar

docs/fr/guide/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Voici un exemple complet de fichier de configuration :
88

99
```yaml
1010
site_name: "Ma Documentation"
11-
site_url: "[https://exemple.com](https://exemple.com)"
11+
site_url: "https://exemple.com"
1212

1313
# Dossiers
1414
docs_dir: "docs"

docs/fr/guide/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Vous pouvez télécharger l'exécutable autonome directement. C'est la méthode
1414

1515
```bash
1616
# Télécharger la dernière version
17-
wget [https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar](https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar)
17+
wget https://github.com/ezar101/litedocs/releases/latest/download/litedocs.phar
1818

1919
# Rendre exécutable
2020
chmod +x litedocs.phar

0 commit comments

Comments
 (0)