Skip to content

Commit b4ddda8

Browse files
committed
feat(ci): Build doc from the flatimage repo
1 parent cdf82a4 commit b4ddda8

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/deploy-docs.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Developer Documentation to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
pages: write
9+
id-token: write
10+
11+
concurrency:
12+
group: "pages"
13+
cancel-in-progress: false
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout docs-developer repository
20+
uses: actions/checkout@v4
21+
with:
22+
repository: flatimage/flatimage-staging
23+
token: ${{ secrets.DOCS }}
24+
25+
- name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
28+
- name: Build developer documentation with Docker
29+
run: |
30+
cd /home/runner/work/docs-developer-staging/docs-developer-staging
31+
docker build -f docker/Dockerfile.doxygen -t flatimage-doxygen .
32+
33+
- name: Extract site from Docker container
34+
run: |
35+
# Create a container from the image
36+
docker create --name doxygen-container flatimage-doxygen
37+
38+
# Copy the site directory from the container
39+
docker cp doxygen-container:/flatimage/site ./site
40+
41+
# Clean up the container
42+
docker rm doxygen-container
43+
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: ./site
48+
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
needs: build
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)