Skip to content

Commit

Permalink
smokeshow test
Browse files Browse the repository at this point in the history
  • Loading branch information
gotmax23 committed Sep 13, 2024
1 parent 094183c commit 7f19a65
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion .github/workflows/build-package-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,13 @@ on:
required: true
default: test
options:
# Production builds on RTD
- production
# Test builds on Github Actions
- test
# https://github.com/samuelcolvin/smokeshow
# Ephemeral CI builds using smokeshow for PRs
- smokeshow

env:
PACKAGE_VERSION: ${{ github.event.inputs.ansible-package-version || 'devel' }}
Expand Down Expand Up @@ -85,7 +90,10 @@ jobs:
run: echo VERSION="${PACKAGE_VERSION}" >> "${GITHUB_ENV}"

- name: Build the Ansible community package docs
run: make webdocs ANSIBLE_VERSION="${COLLECTION_LIST}"
# run: make webdocs ANSIBLE_VERSION="${COLLECTION_LIST}"
run: |
mkdir -p _build/html
echo "<h1>Hello world</h1>" > _build/html/index.html
working-directory: build-directory/docs/docsite

- name: Create a tarball with the build contents
Expand Down Expand Up @@ -146,6 +154,7 @@ jobs:
deploy-package-docs:
needs:
- check-deploy
if: 'inputs.deployment-environment != "smokeshow"'
runs-on: ubuntu-latest
environment:
name: deploy-package-docs
Expand Down Expand Up @@ -233,3 +242,33 @@ jobs:
- name: Push build to deploy repository
run: git push origin
working-directory: deploy-directory

deploy-docs-smokeshow:
runs-on: ubuntu-latest
needs:
- check-deploy
environment: smokeshow
permissions:
contents: read
checks: write # Smokeshow uses checks API
steps:
- name: Setup UV
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Download the build archive
uses: actions/download-artifact@v4
with:
name: package-docs-build
- name: Extract the tarball
run: >-
tar -xvzf
ansible-package-docs-html-*.tar.gz
--one-top-level
- name: Upload to smokeshow
run: uvx smokeshow upload docs
env:
SMOKESHOW_GITHUB_STATUS_DESCRIPTION: Package docs build preview
SMOKESHOW_GITHUB_CONTEXT: build-package-docs
SMOKESHOW_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMOKESHOW_GITHUB_PR_HEAD_SHA: >-
${{ github.event.workflow_run.head_sha }}
SMOKESHOW_AUTH_KEY: ${{ secrets.SMOKESHOW_AUTH_KEY }}

0 comments on commit 7f19a65

Please sign in to comment.