generateReadme: Refresh #1916
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: Generate Readme | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
generate-readme: | |
if: "!startsWith(github.event.head_commit.message, 'generateReadme:') && !startsWith(github.event.head_commit.message, 'UpdatedAt:')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}' | |
- run: "pip install MarkupSafe==2.0.1" | |
- run: "pip install numpy==1.19.5" | |
- run: "pip install notebook" | |
- run: "pip install naas_drivers[markdown]" | |
- run: "pip install papermill" | |
- run: "pip install Markdown==3.3.7" | |
- run: "pip install algoliasearch==3.0.0" | |
- run: "jupyter nbconvert --execute generate_readme.ipynb --inplace" | |
- run: "jupyter nbconvert --clear-output --inplace generate_readme.ipynb" | |
- run: "jupyter nbconvert --execute .github/push_templates_to_algolia.ipynb --inplace" | |
env: | |
ALGOLIA_APP_ID: '${{ secrets.ALGOLIA_APP_ID }}' | |
ALGOLIA_API_KEY: '${{ secrets.ALGOLIA_API_KEY }}' | |
- run: "jupyter nbconvert --clear-output --inplace .github/push_templates_to_algolia.ipynb" | |
# - uses: EndBug/add-and-commit@v7.2.1 | |
# with: | |
# message: 'generateReadme: Refresh' | |
- name: Commit and push | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git pull --no-edit | |
git commit -m 'generateReadme: Refresh' -a | |
git push |