-
Notifications
You must be signed in to change notification settings - Fork 36
132 lines (113 loc) · 3.31 KB
/
docs.yaml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# This workflow is a mix of:
# - https://github.com/pola-rs/r-polars/blob/main/.github/workflows/check.yaml
# - https://github.com/r-lib/actions/blob/v2-branch/examples/pkgdown.yaml
# - https://squidfunk.github.io/mkdocs-material/publishing-your-site/?h=deploy#material-for-mkdocs
name: docs
on:
push:
branches:
- main
tags:
- "v*"
paths:
- .github/workflows/docs.yaml
- altdoc/**
- man/**
- R/**
- src/**
- vignettes/**
- DESCRIPTION
- README.md
- NEWS.md
pull_request:
branches:
- main
paths:
- .github/actions/setup/action.yaml
- .github/workflows/docs.yaml
- altdoc/**
- man/**
- R/**
- src/**
- vignettes/**
- DESCRIPTION
- README.md
- NEWS.md
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
LIBR_POLARS_FEATURES: "full_features"
LIBR_POLARS_BUILD: "true"
LIBR_POLARS_PROFILE: release
permissions: read-all
jobs:
documentation:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
docs_key: ${{ secrets.DEPLOY_DOCS }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set rust target
id: rust-target
run: |
if [ "${{ runner.os }}" == "Windows" ]; then
echo "TARGET=x86_64-pc-windows-gnu" >>"$GITHUB_OUTPUT"
else
echo "TARGET=$(rustc -vV | grep host | cut -d' ' -f2)" >>"$GITHUB_OUTPUT"
fi
- uses: ./.github/actions/setup
with:
target: "${{ steps.rust-target.outputs.TARGET }}"
token: "${{ secrets.GITHUB_TOKEN }}"
- uses: actions/setup-python@v5
with:
python-version: 3.x
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
Ncpus: 2
# altdoc uses quarto
- uses: quarto-dev/quarto-actions/setup@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: dev,website
- name: Get requirements
run: |
task setup-python-tools
- name: Build docs
run: task build-website
- name: upload docs
if: always()
uses: actions/upload-artifact@v4
with:
name: docs
path: docs
- uses: webfactory/[email protected]
env:
DEPLOY_DOCS: ${{ secrets.DEPLOY_DOCS }}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'pola-rs') }}
with:
ssh-private-key: ${{ secrets.DEPLOY_DOCS }}
# https://www.mkdocs.org/user-guide/deploying-your-docs/
- name: Build site and deploy to GitHub pages
env:
DEPLOY_DOCS: ${{ secrets.DEPLOY_DOCS }}
if: ${{ (github.event_name != 'pull_request') && (github.repository_owner == 'pola-rs') }}
uses: JamesIves/github-pages-deploy-action@v4
with:
clean: true
branch: main
folder: docs
repository-name: rpolars/rpolars.github.io
ssh-key: true
clean-exclude: |
.nojekyll