forked from cclib/cclib
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.73 KB
/
docs.yml
File metadata and controls
57 lines (54 loc) · 1.73 KB
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
---
# yamllint disable rule:line-length
name: docs push
# yamllint disable-line rule:truthy
on:
workflow_dispatch:
workflow_call:
concurrency:
group: docs-${{github.ref}}-${{github.event.pull_request.number || github.run_number}}
cancel-in-progress: true
jobs:
build-and-push-docs:
runs-on: ubuntu-22.04
strategy:
matrix:
container:
- 'shivupa/cclib-ci:py311-edge'
container:
image: ${{ matrix.container }}
defaults:
run:
shell: bash -eo pipefail -l {0}
steps:
- name: Installs for ssh-agent
run: |
apt-get update && apt-get install -y openssh-client
- name: Checkout
uses: actions/checkout@v4
with:
# so versioningit can figure out the version
fetch-depth: 0
fetch-tags: true
- name: Allow repo access (see https://github.com/actions/checkout/issues/760)
run: |
git config --global --add safe.directory /__w/cclib/cclib
- name: Prepare conda environment
run: |
echo "/opt/conda/envs/cclib/bin" >> $GITHUB_PATH
- name: Build docs
run: cd doc && make default
- name: Make a no jekyll file
run: touch doc/sphinx/_build/html/.nojekyll
- name: Pushes to another repository
id: push_directory
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.CCLIB_DOCS_KEY }}
with:
source-directory: doc/sphinx/_build/html
destination-github-username: 'cclib'
destination-repository-name: 'cclib.github.io'
commit-message: See ORIGIN_COMMIT from $GITHUB_REF
target-branch: master
if: github.ref == 'refs/heads/master'