add primary ReadME #45
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: CI | ||
| on: | ||
| pull_request: | ||
| types: [opened] | ||
| jobs: | ||
| generate: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: Khan/pull-request-comment-trigger@master | ||
| id: check | ||
| with: | ||
| trigger: '@generate' | ||
| reaction: rocket | ||
| env: | ||
| GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}' | ||
| - uses: actions/checkout@v2 # Updated to use v2 for better performance and features | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| - name: Dump GitHub context | ||
| id: github_context_step | ||
| # Enclose the JSON in double quotes and escape internal double quotes to prevent shell errors | ||
| run: echo "${{ toJSON(github).replace('\"', '\\\"') }}" | ||
| - name: Install modules and run it | ||
| run: yarn | ||
| if: steps.check.outputs.triggered == 'true' | ||
| - name: Generate Curriculum | ||
| run: yarn generate:curriculum:ci | ||
| if: steps.check.outputs.triggered == 'true' | ||
| env: | ||
| GITHUB_HEAD_REF: ${{ github.head_ref }} | ||
| GITHUB_ACTOR: ${{ github.actor }} | ||