Merge pull request #3337 from dabukalam/patch-1 #29
This file contains 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
--- | |
# This is a slightly adjusted version of the Jekyll pages starter workflow. | |
# https://github.com/actions/starter-workflows/blob/main/pages/jekyll-gh-pages.yml | |
name: Docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
# Allow only one concurrent deployment, skipping runs queued between the run | |
# in-progress and latest queued. However, do NOT cancel in-progress runs as we | |
# want to allow these production deployments to complete. | |
# | |
# Since pull requests use a unique artifact name and won't be deployed, they | |
# shouldn't be limited. Use a unique group name in that case and let in | |
# progress runs be cancelled. | |
concurrency: | |
group: "pages${{ github.event_name == 'pull_request' && format('-pr{0}', github.event.number) || '' }}" | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
build: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
container: registry.ci.openshift.org/coreos/fcos-buildroot:testing-devel | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: GH actions checkout post | |
run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
# This is taken from ci/travis-install.sh but should probably be | |
# refactored. | |
- name: Install dependencies | |
run: ./ci/installdeps.sh | |
- name: Build API docs and manpages | |
run: | | |
./autogen.sh --enable-gtk-doc --enable-man --enable-man-html | |
make -C apidoc | |
make manhtml | |
- name: Copy API docs and manpages | |
run: ./docs/prep-docs.sh | |
- name: Build jekyll docs | |
uses: actions/jekyll-build-pages@v1 | |
with: | |
source: ./docs | |
destination: ./docs/_site | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: docs/_site | |
# The default name is github-pages to match actions/deploy-pages. For | |
# PRs use a different name so results can be inspected without real | |
# deployments accidentally getting the wrong artifact. | |
name: "github-pages${{ github.event_name == 'pull_request' && '-pr' || '' }}" | |
deploy: | |
name: Deploy documentation | |
runs-on: ubuntu-latest | |
needs: build | |
# Skip deployment on pull requests. | |
if: ${{ github.event_name != 'pull_request' }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Grant permissions to deploy to Pages. The id-token permission is needed | |
# to verify the deployment originates from an appropriate source. | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |