Skip to content

Deploy to readme dot com #262

Deploy to readme dot com

Deploy to readme dot com #262

Workflow file for this run

name: Deploy to readme dot com
on:
push:
branches: [main]
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: Set up python
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # 5.1.1
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 }}