* Try building docs with GitHub Actions * fix GH_PAT secret
This commit is contained in:
parent
26bd96350b
commit
c1fbe8fe50
|
|
@ -0,0 +1,15 @@
|
|||
FROM phpdoc/phpdoc
|
||||
|
||||
LABEL "repository"="https://github.com/PHPMailer/PHPMailer"
|
||||
|
||||
LABEL "com.github.actions.name"="Build Docs"
|
||||
LABEL "com.github.actions.description"="Build Docs with phpDocumentor"
|
||||
LABEL "com.github.actions.icon"="file-text"
|
||||
LABEL "com.github.actions.color"="blue"
|
||||
|
||||
# don't show errors
|
||||
RUN echo "display_errors = Off" > $PHP_INI_DIR/conf.d/errors.ini
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eu
|
||||
|
||||
/opt/phpdoc/bin/phpdoc
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
name: Docs
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build Docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v1
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Build Docs
|
||||
uses: ./.github/actions/build-docs
|
||||
- name: Upload file artifacts
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: docs
|
||||
path: docs/
|
||||
|
||||
publish:
|
||||
name: Publish Docs
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download file artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: docs
|
||||
- name: Publish Docs to gh-pages
|
||||
uses: maxheld83/ghpages@v0.2.1
|
||||
env:
|
||||
BUILD_DIR: docs/
|
||||
GH_PAT: ${{ secrets.GH_PAT }}
|
||||
Loading…
Reference in New Issue