Generate images for docs #39
This file contains hidden or 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 images for docs | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| rich_codex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
| with: | |
| # Use @nf-core-bot token to check out so we can push without a PR | |
| token: ${{ secrets.NF_CORE_BOT_AUTH_TOKEN }} | |
| # Add Node.js setup step | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Set up Python | |
| uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5 | |
| with: | |
| python-version: 3.9 | |
| - name: Remove type:module from package.json | |
| run: | | |
| if [ -f "$GITHUB_WORKSPACE/package.json" ]; then | |
| sed -i '/"type": "module"/d' "$GITHUB_WORKSPACE/package.json" | |
| echo "Removed type:module from package.json" | |
| fi | |
| - name: Install Nextflow | |
| uses: nf-core/setup-nextflow@v2 | |
| - name: Install nf-test | |
| uses: nf-core/setup-nf-test@v1 | |
| - name: Install nf-core/tools | |
| run: pip install nf-core | |
| - name: Generate terminal images with rich-codex | |
| uses: ewels/rich-codex@01d0c612957f19aee84cf4d9643b6d0e231493d8 # v1 | |
| env: | |
| COLUMNS: 100 | |
| HIDE_PROGRESS: "true" | |
| NXF_ANSI_LOG: false | |
| with: | |
| commit_changes: "true" | |
| terminal_width: 100 | |
| skip_git_checks: "true" | |
| search_include: ".github/workflows/rich-codex.yml" | |
| - name: Restore package.json | |
| run: | | |
| git checkout "$GITHUB_WORKSPACE/package.json" |