From aaed38c899a958a88a6a368a70510e350ebe336c Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 14 Jan 2021 16:19:14 -0500 Subject: [PATCH] Generate documentation snapshot for releases Signed-off-by: Stephen Gallagher --- .github/workflows/release.yaml | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..1ccd95a1 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,43 @@ +name: Release Tasks +on: + release: + types: [published] + +jobs: + docs: + name: Publish Documentation + runs-on: ubuntu-20.04 + continue-on-error: false + if: github.repository == 'fedora-modularity/libmodulemd' + steps: + - name: Checkout code repo + uses: actions/checkout@v2 + + - name: Checkout documentation repo + uses: actions/checkout@v2 + with: + repository: fedora-modularity/fedora-modularity.github.io + ref: main + path: fedora-modularity.github.io + token: ${{ secrets.DOC_TOKEN }} + + - name: Get release version + run: | + echo "version=$(./get_version.sh)" >> $GITHUB_ENV + + - name: Generate documentation + run: | + ./.ci/ci-docs.sh $version + + - name: Commit documentation + uses: EndBug/add-and-commit@v6 + with: + branch: main + token: ${{ secrets.DOC_TOKEN }} + cwd: fedora-modularity.github.io + author_name: Libmodulemd CI + author_email: github-actions@github.com + message: libmodulemd docs for ${{ env.version }} + add: libmodulemd/${{ env.version }} + signoff: true + push: true