-
Notifications
You must be signed in to change notification settings - Fork 4
75 lines (64 loc) · 2.77 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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 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
path: ./maurodatamapper.github.io
token: ${{secrets.MKDOCS_INSIDERS_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() }}
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 }}