Build site #108
This file contains hidden or 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: Build site | |
| on: | |
| push: | |
| paths: | |
| - 'templates/**' | |
| - 'include/**' | |
| - 'tools/buildsite.py' | |
| schedule: | |
| # every four hours: a documentation change in the content repository has | |
| # nothing to announce it here, so this is what publishes it | |
| - cron: '51 */4 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: build-site | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout site | |
| uses: actions/checkout@v4 | |
| with: | |
| path: site | |
| - name: Checkout content | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: 3proxy/3proxy | |
| ref: master | |
| path: 3proxy | |
| - name: Build | |
| env: | |
| TITLE_PREFIX: "3proxy : Documentation" | |
| run: python3 site/tools/buildsite.py 3proxy site | |
| - name: Commit | |
| run: | | |
| cd site | |
| if [ -z "$(git status --porcelain)" ]; then | |
| echo "site already up to date" | |
| exit 0 | |
| fi | |
| git status --short | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git add -A | |
| git commit -m "Rebuild site from 3proxy master" | |
| git push |