Repository navigation
62 lines (50 loc) · 1.54 KB
/
Copy pathgh-pages.yml
File metadata and controls
62 lines (50 loc) · 1.54 KB
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
name: github pages
on:
push: {}
pull_request: {}
workflow_dispatch: {}
env:
DEBIAN_FRONTEND: noninteractive
TZ: Japan
jobs:
build-docs:
runs-on: ubuntu-latest
timeout-minutes: 20
container:
image: ubuntu:20.04
options: "--user 0"
steps:
- name: Set up base environment
run: apt-get -y update && apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install build-essential git doxygen graphviz p7zip-full
- name: Checkout repository
uses: actions/checkout@v7
- name: Mark all git directories safe
run: git config --global --add safe.directory '*'
- name: Build documentation
run: |
export PS2DEV=$PWD/ps2dev
export PS2SDK=$PS2DEV/ps2sdk
make -j $(getconf _NPROCESSORS_ONLN) ONLY_HOST_TOOLS=1 docs
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: ${{ github.event.repository.name }}-docs
path: ./*.tgz
publish-github-pages:
needs: [build-docs]
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Download all artifacts
uses: actions/download-artifact@v7
- name: Extract artifact
run: |
mkdir -p docs/html
find . -name "*.tgz" -exec tar -xpzf {} -C docs/html \;
- name: Deploy
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html
force_orphan: true