Update the documentation website #291
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
name: Update the documentation website | |
on: | |
workflow_dispatch: | |
jobs: | |
Update-Submodules: | |
runs-on: ubuntu-latest | |
if: startsWith(github.repository, 'osg-htc/') | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
fetch-depth: 0 | |
- name: Pull, Merge, Push submodules | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git submodule update --init --recursive --remote | |
if [ -n "$(git status --porcelain)" ]; then | |
git add . | |
git commit -m "Update Documentation" | |
git push | |
else | |
echo "no changes"; | |
fi | |
publish-new-release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.repository, 'osg-htc/') | |
needs: Update-Submodules | |
outputs: | |
tag: ${{ steps.publish-new-release-tag.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- name: Publish a new release | |
id: publish-new-release-tag | |
run: | | |
echo "tag=$( python3 ./.github/scripts/create-documentation-release.py ${{ secrets.GITHUB_TOKEN }} )" >> $GITHUB_OUTPUT | |
Call-publish-container: | |
if: startsWith(github.repository, 'osg-htc/') | |
needs: Publish-New-Release | |
uses: osg-htc/osg-portal/.github/workflows/publish-container.yml@master | |
secrets: inherit | |
with: | |
tag: ${{ needs.publish-new-release.outputs.tag }} |