-
Notifications
You must be signed in to change notification settings - Fork 196
59 lines (49 loc) · 1.87 KB
/
deploy-readme.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
name: Deploy to readme dot com
on:
release:
types: [published]
workflow_dispatch:
defaults:
run:
shell: bash -l {0}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-readme:
runs-on: ubuntu-latest
env:
readme_version: "0.0.2"
steps:
- name: Clone repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Set up python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with:
python-version: "3.10"
- name: Install pip requirements
run: pip install ".[dev]"
- name: Install Quarto
run: nbdev_install_quarto
- name: Create readme docs
env:
README_HOST_URL: ${{ secrets.README_HOST_URL }}
README_CATEGORY: ${{ secrets.README_CATEGORY }}
README_API_KEY: ${{ secrets.README_API_KEY }}
README_VERSION: ${{ env.readme_version }}
run: ./action_files/readme_com/create_readme_docs.sh
- name: Push PNGs to readme_docs branch
run: |
git config --global user.name 'FedericoGarza'
git config --global user.email '[email protected]'
git push https://${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }} --delete readme_docs || true
git checkout -b readme_docs
git add -f "*.png"
git commit -m "[cd] update png images" || echo "No changes to commit"
git push https://${{ secrets.TOKEN_GITHUB }}@github.com/${{ github.repository }} HEAD:readme_docs
- name: Deploy to readme com
uses: readmeio/rdme@51a80867c45de15e2b41af0c4bd5bbc61b932804 # 8.6.6
with:
rdme: docs ./nbs/_docs/docs/ --key=${{ secrets.README_API_KEY }} --version=${{ env.readme_version }}