Update token secret in CI workflow #17
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: Publish | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| permissions: | ||
| contents: write | ||
| jobs: | ||
| deploy: | ||
| runs-on: ubuntu-latest | ||
| if: github.event.repository.fork == false | ||
| defaults: | ||
| run: | ||
| working-directory: ./docs # Only applies to `run` steps | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| path: ./docs | ||
| - name: Configure Git Credentials | ||
| run: | | ||
| git config user.name github-actions[bot] | ||
| git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
| - name: Setup Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.8 | ||
| - name: Generate Cache ID | ||
| run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | ||
| - name: Cache the key | ||
| uses: actions/cache@v4 | ||
| with: | ||
| key: mkdocs-material-${{ env.cache_id }} | ||
| path: .cache | ||
| restore-keys: | | ||
| mkdocs-material- | ||
| ## This step is only necessary if you want to use the built-in optimize plugin to automatically compress images. | ||
| ## | ||
| ## - run: apt-get install pngquant | ||
| ## | ||
| - name: Install mkdocs-material-insiders | ||
| run: pip install mkdocs-material | ||
| - name: Install plugins | ||
| run: pip install -e plugins | ||
| - name: Checkout maurodatamapper.github.io | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: MauroDataMapper/maurodatamapper.github.io | ||
| ref: refs/heads/main | ||
| path: ./maurodatamapper.github.io | ||
| token: ${{ secrets.ACCESS_TOKEN }} | ||
| - name: Deploy | ||
| working-directory: ./maurodatamapper.github.io | ||
| run: mkdocs gh-deploy --config-file ../docs/mkdocs.yml --remote-branch main | ||
| - name: Send a stream message | ||
| if: ${{ success() }} || ${{ failure() }} | ||
|
Check warning on line 67 in .github/workflows/ci.yml
|
||
| uses: zulip/github-actions-zulip/send-message@v1 | ||
| with: | ||
| api-key: ${{ secrets.ZULIP_API_KEY }} | ||
| email: "githubactionsbot-bot@maurodatamapper.zulipchat.com" | ||
| organization-url: "https://maurodatamapper.zulipchat.com" | ||
| to: "build/github-actions" | ||
| type: "stream" | ||
| topic: "${{github.repository}}" | ||
| content: "${{ job.status == 'success' && ':check_mark:' || ':cross_mark:' }} ${{github.repository}} : **${{github.ref}}**\nGitHub Actions build result: **${{ job.status }}**\n${{ github.event.pull_request.html_url || github.event.head_commit.url }}" | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||