This repository has been archived by the owner on May 10, 2024. It is now read-only.
chore(deps): update mongodb/mongodb-community-server docker tag to v7 #252
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: Generate documentation and deploy on GH Pages | |
on: | |
push: | |
tags: '*' | |
branches-ignore: | |
- 'autodelivery**' | |
- 'bump-**' | |
- 'renovate/**' | |
paths-ignore: | |
- 'README.md' | |
- 'CHANGELOG.md' | |
- 'LICENSE' | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
generate-doc: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: danysk/action-checkout@0.2.14 | |
- name: Setup java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'adopt' | |
java-version: 17 | |
- name: Compute the version of Hugo | |
id: hugo | |
shell: bash | |
run: | | |
# Idea: the regex matcher of Renovate keeps this string up to date automatically | |
# The version is extracted and used to access the correct version of the scripts | |
USES=$(cat <<TRICK_RENOVATE | |
- uses: gohugoio/hugo@v0.122.0 | |
TRICK_RENOVATE | |
) | |
echo "Scripts update line: \"$USES\"" | |
echo "Computed version: \"${USES#*@v}\"" | |
echo "::set-output name=version::${USES#*@v}" | |
- name: Download Hugo | |
run: | | |
HUGO_VERSION="${{ steps.hugo.outputs.version }}" | |
URL="https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb" | |
wget --retry-connrefused --waitretry=1 --read-timeout=20 "$URL" --output-document=hugo.deb | |
- name: Install Hugo | |
run: | | |
sudo dpkg -i hugo.deb | |
hugo version | |
rm hugo.deb | |
- name: Geneate Javadoc smart contracts | |
run : | | |
pushd smart-contracts | |
./gradlew javadoc | |
popd | |
ls -lah ./smart-contracts/build/javadoc/ | |
mkdir -p ./public/smart-contracts && cp -r ./smart-contracts/build/javadoc/ ./public/smart-contracts/ | |
- name: Generate Swagger UI for API server | |
uses: Legion2/swagger-ui-action@v1 | |
with: | |
output: ./public/swagger-ui-api | |
spec-file: ./api-service/api/swagger.json | |
- name: Generate Swagger UI for AUTH server | |
uses: Legion2/swagger-ui-action@v1 | |
with: | |
output: ./public/swagger-ui-auth | |
spec-file: ./api-service/auth/swagger.json | |
- name: Build slides with hugo | |
run: | | |
pushd docs/presentation | |
ls -la | |
hugo | |
popd | |
mkdir -p ./public/presentation && cp -r ./docs/presentation/public/* ./public/presentation/ | |
- name: ls | |
run: | | |
ls -la ./public | |
ls -la ./public/presentation | |
ls -la ./public/smart-contracts/ | |
ls -la ./public/swagger-ui-api | |
ls -la ./public/swagger-ui-auth | |
- name: Deploy auth docs to GitHub Pages | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_branch: api-doc | |
publish_dir: ./public |