Deploy Developer Documentation to GitHub Pages #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy Developer Documentation to GitHub Pages | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout docs-developer repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: flatimage/flatimage | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build developer documentation with Docker | |
| run: | | |
| cd /home/runner/work/docs-developer/docs-developer | |
| docker build -f docker/Dockerfile.doxygen -t flatimage-doxygen . | |
| - name: Extract site from Docker container | |
| run: | | |
| # Create a container from the image | |
| docker create --name doxygen-container flatimage-doxygen | |
| # Copy the site directory from the container | |
| docker cp doxygen-container:/flatimage/site ./site | |
| # Clean up the container | |
| docker rm doxygen-container | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |