-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
74 lines (72 loc) · 2.41 KB
/
main.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Build docs site
on:
push:
branches: [11.x, 12.x, 13.x]
tags: ["11.*", "12.*", "13.*"]
jobs:
build:
permissions:
contents: write # for git push
name: Build docs and push
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Git
run: |
git config --local user.email "[email protected]"
git config --local user.name "Drush Documentation Bot"
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs==1.4.3 mkdocs-material mike mkdocs-git-authors-plugin mkdocs-redirects mkdocs-git-revision-date-localized-plugin pymdown-extensions git+https://gitlab.com/blacs30/mkdocs-edit-url.git
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, gd, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
tools: composer:v2
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction
- name: Install Drupal
run: composer sut:si
env:
UNISH_DB_URL: sqlite://sites/default/files/.ht.sqlite
- name: Drush status
run: ./drush --uri=dev st
- name: Drush mk:docs
run: composer mk:docs
- name: Mike config
run: |
mike alias 12.x latest
mike set-default latest
- name: Mike deploy
run: mike deploy --push ${GITHUB_REF_NAME}
# Build Doctum to gh-pages/api in the gh-pages branch.
- name: Checkout gh-pages branch
uses: actions/checkout@v2
with:
ref: gh-pages
path: gh-pages
fetch-depth: 0
- name: Git pull
run: cd gh-pages && git pull
- name: Install Doctum
run: composer doctum-install
- name: Doctum build
run: |
rm -rf gh-pages/latest/api
composer api -- --only-version=${GITHUB_REF_NAME}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[CI] Add Doctum build"
repository: gh-pages
commit_user_name: "Drush Documentation Bot"
commit_user_email: "[email protected]"