Try a different security token #11
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: Publish | |
on: | |
push: | |
branches: | |
- develop | |
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: Install GH CLI | |
uses: dev-hanz-ops/install-gh-cli-action@v0.1.0 | |
with: | |
gh-cli-version: 2.32.0 | |
- run: gh auth status | |
- 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 mkdoce-material-insiders | |
run: pip install git+https://${{secrets.MKDOCS_INSIDERS_TOKEN}}@github.com/squidfunk/mkdocs-material-insiders.git | |
- name: Checkout maurodatamapper.github.io | |
uses: actions/checkout@v4 | |
with: | |
repository: MauroDataMapper/maurodatamapper.github.io | |
ref: refs/heads/main # change this to test against another branch | |
path: ./maurodatamapper.github.io | |
token: ${{secrets.MKDOCS_INSIDERS_TOKEN}} | |
- name: List | |
working-directory: ./maurodatamapper.github.io | |
run: | | |
ls . | |
ls ../docs | |
- 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() }} | |
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 }} |