add discord links #241
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: Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| # schedule: | |
| # - cron: '0 0 1 * *' # every month | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' # or '20', 'lts/*', etc. | |
| - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
| - uses: actions/cache@v4 | |
| with: | |
| key: mkdocs-material-${{ env.cache_id }} | |
| path: .cache | |
| restore-keys: | | |
| mkdocs-material- | |
| - run: pip install -r requirements.txt | |
| - name: Install jaculus-tools | |
| run: npm install -g jaculus-tools | |
| - name: Update project files | |
| run: | |
| bash update-projects.sh | |
| git add . | |
| git commit --allow-empty-message | |
| - name: Jac build | |
| run: bash jac-autocompile.sh | |
| - name: Configure git identity | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Deploy V1 | |
| run: | | |
| echo "Deploying v1..." | |
| mike deploy --config-file mkdocs.v1.yml v1 --ignore-remote-status | |
| - name: Deploy V2 | |
| run: | | |
| echo "Deploying v2..." | |
| mike deploy --config-file mkdocs.v2.yml v2 latest --ignore-remote-status | |
| - name: Set default version | |
| run: | | |
| echo "Setting default version as v2..." | |
| mike set-default --config-file mkdocs.v2.yml v2 --ignore-remote-status | |
| - name: Add CNAME | |
| run: | | |
| git checkout gh-pages | |
| echo "robutek.robotikabrno.cz" > CNAME | |
| git add CNAME | |
| git commit -m "Add CNAME" || echo "No changes to commit" | |
| git checkout - | |
| - name: Push gh-pages to origin | |
| run: | | |
| git push --force origin gh-pages | |