|
| 1 | +name: Update Documentation |
| 2 | + |
| 3 | +on: |
| 4 | + issues: |
| 5 | + types: [ labeled ] |
| 6 | + |
| 7 | +jobs: |
| 8 | + update_docs: |
| 9 | + if: contains(github.event.issue.labels.*.name, 'update-docs') |
| 10 | + runs-on: ubuntu |
| 11 | + permissions: |
| 12 | + contents: write |
| 13 | + pull-requests: write |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Checkout Latest Code |
| 17 | + uses: actions/checkout@v3 |
| 18 | + |
| 19 | + - name: Install NodeJS |
| 20 | + uses: actions/setup-node@v3 |
| 21 | + with: |
| 22 | + node-version: 18 |
| 23 | + |
| 24 | + - name: Install Dependencies |
| 25 | + run: npm install |
| 26 | + |
| 27 | + - name: Setup Submodules |
| 28 | + run: git submodule init |
| 29 | + |
| 30 | + - name: Install Submodules |
| 31 | + run: git submodule update |
| 32 | + |
| 33 | + - name: Update Submodules |
| 34 | + run: git submodule update --remote --merge |
| 35 | + |
| 36 | + - name: Update Latest Pulsar Version |
| 37 | + run: node ./pulsar-api/update-latest-script.js ${{ github.event.issue.title }} |
| 38 | + |
| 39 | + - name: Update Documentation |
| 40 | + run: npm run generate:docs |
| 41 | + |
| 42 | + - name: Create Pull Request with Changes |
| 43 | + uses: peter-evans/create-pull-request@v4 |
| 44 | + with: |
| 45 | + # If we ever start running tests on PRs we will need to provide a custom |
| 46 | + # PAT token here to ensure additional workflows are allowed to run. |
| 47 | + # https://github.com/pulsar-edit/pulsar-chocolatey/blob/main/.github/workflows/draft_publish.yml |
| 48 | + # token: ${{ secrets.<TOKEN_NAME_TO_ADD> }} |
| 49 | + commit-message: Auto update source code documentation |
| 50 | + branch: docs-update-${{ github.event.issue.title }} |
| 51 | + delete-branch: true |
| 52 | + title: '[${{ github.event.issue.title }}] Documentation Update' |
| 53 | + body: | |
| 54 | + Automated update of Source Code documentation. |
| 55 | + Will close #${{ github.event.issue.number }} |
| 56 | + draft: false |
0 commit comments