forked from ibis-project/ibis
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.73 KB
/
ibis-docs-release.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
# vim: filetype=yaml
name: Docs Release Build
on:
release:
types:
- published
jobs:
docs:
concurrency: docs-${{ github.repository }}-${{ github.head_ref || github.sha }}
runs-on: ubuntu-latest
steps:
- name: install nix
uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable-small
- name: setup cachix
uses: cachix/cachix-action@v10
with:
name: ibis
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
extraPullNames: nix-community,poetry2nix
- name: Generate a GitHub token
uses: tibdex/github-app-token@v1
id: generate_token
with:
app_id: ${{ secrets.DOCS_BOT_APP_ID }}
private_key: ${{ secrets.DOCS_BOT_APP_PRIVATE_KEY }}
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ steps.generate_token.outputs.token }}
- name: Configure git info
run: |
set -euo pipefail
git config user.name 'ibis-docs-bot[bot]'
git config user.email 'ibis-docs-bot[bot]@users.noreply.github.com'
- name: Pull gh-pages changes
run: |
set -euo pipefail
git fetch origin gh-pages
git update-ref refs/heads/gh-pages "$(git rev-parse origin/gh-pages)"
- name: build and push docs on tag
run: |
set -euo pipefail
nix run -f nix mic -- \
deploy \
--push \
--rebase \
--update-aliases \
--prefix docs \
--message "docs(release): ibis@${GITHUB_REF_NAME}" \
"${GITHUB_REF_NAME}" latest
env:
PYTHONPATH: .