Deploy to readme dot com #178
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v2 | |
with: | |
persist-credentials: false | |
- name: Set up environment | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: environment.yml | |
create-args: python=3.9 | |
cache-environment: true | |
- name: Install pip requirements | |
run: pip install ./ | |
- 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@v8 | |
with: | |
rdme: docs ./nbs/_docs/docs/ --key=${{ secrets.README_API_KEY }} --version=${{ env.readme_version }} |