1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- # Sphinx build
- steps:
- - name: build-html
- image: sphinxdoc/sphinx
- when:
- event: [ push, pull_request, tag ]
- commands:
- #- pip3 install --upgrade pip
- - pip3 install --upgrade pydata-sphinx-theme
- - pip3 install --upgrade sphinx-copybutton
- - pip3 install --upgrade sphinx-design
- - cd ./docs
- - sphinx-build -b html . build -W
- - name: build-pdf
- image: sphinxdoc/sphinx-latexpdf
- when:
- event: [ push, pull_request, tag ]
- commands:
- - cd ./docs
- #- pip3 install --upgrade pip
- - pip3 install --upgrade sphinx-copybutton
- - pip3 install --upgrade sphinx-design
- - sphinx-build -M latexpdf . build -W
- # Based on: https://codeberg.org/gitnex/tea4j-autodeploy/src/branch/main/.woodpecker.yml
- - name: deploy
- image: alpine/git
- when:
- event: [ push, tag ]
- branch: main
- environment:
- # Information that should be used when authoring a commit
- - GIT_AUTHOR_NAME=arubot
- - GIT_AUTHOR_EMAIL=arubot@noreply.codeberg.org
- - GIT_COMMIT_MESSAGE=Synchronization with changes to the ARU
- # Basic information concerning the repo that
- - GITEA_HOST=codeberg.org
- - GITEA_REPOSITORY=ventureo/pages
- - GITEA_BRANCH=main
- # Username and token that should be used to authenticate against the gitea instance
- # - GITEA_USERNAME=secret
- # - GITEA_TOKEN=secret
- secrets: [ gitea_username, gitea_token ]
- commands:
- # Setup git credentials and checkout target branch
- - git clone https://codeberg.org/ventureo/pages
- - cp -r ./docs/build/* pages/
- - cd pages
- - git config user.name "$${GIT_AUTHOR_NAME}"
- - git config user.email "$${GIT_AUTHOR_EMAIL}"
- - git checkout "$${GITEA_BRANCH}"
- # Stage all important files for commit
- - git add -A
- # If files have changed, create a new commit and push it to the branch this pipeline was started on
- - >
- if git commit --message "$${GIT_COMMIT_MESSAGE}"; then
- git remote set-url origin "https://$${GITEA_USERNAME}:$${GITEA_TOKEN}@$${GITEA_HOST}/$${GITEA_REPOSITORY}"
- git push origin "$${GITEA_BRANCH}" -f
- fi
|