-
-
Notifications
You must be signed in to change notification settings - Fork 640
56 lines (49 loc) · 1.72 KB
/
website.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
on:
workflow_dispatch:
name: Website
env:
extensions: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib, fileinfo, gnupg
key: cache-v1 # can be any string, change to clear the extension cache.
defaultPHPVersion: '7.4'
jobs:
docs:
runs-on: ubuntu-latest
if: github.repository == 'phpDocumentor/phpDocumentor'
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ env.defaultPHPVersion }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=2G, display_errors=On, error_reporting=-1
tools: pecl
- name: Install Composer dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
- name: Generate Documentation
run: |
make build-website
- uses: danielr1996/envsubst-action@1.1.0
name: 'Insert cache-busting hash into html'
with:
input: ./build/website/demo/index.html.dist
output: ./build/website/demo/index.html
- name: Build Container
uses: elgohr/Publish-Docker-Github-Action@master
env:
VERSION: 'latest'
with:
name: phpdocumentor/phpdocumentor/phpdoc-website
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
context: build/website
tags: 'latest'
id: latest_build
- name: 'deploy'
uses: jaapio/keelsh-deploy@1.0.0
with:
keelBaseUrl: ${{ secrets.KEEL_BASE_URL }}
image: 'ghcr.io/phpdocumentor/phpdocumentor/phpdoc-website'
tag: ${{ steps.latest_build.outputs.tag }}