diff --git a/.github/workflows/cicd-pages.yml b/.github/workflows/cicd-pages.yml index 0da9230..6ee5136 100644 --- a/.github/workflows/cicd-pages.yml +++ b/.github/workflows/cicd-pages.yml @@ -1,9 +1,5 @@ name: Deploy to Pages -# Update the issue number below to correspond to the currently active draw -env: - ISSUE_ID: 68 - on: # Runs on pushes targeting the default branch push: @@ -11,9 +7,13 @@ on: # Runs on new issue comments issue_comment: - + # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + inputs: + ISSUE_ID: + description: 'Issue ID' + required: true # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Output Issue ID - run: echo ${{ env.ISSUE_ID }} + run: echo ${{ github.event.inputs.ISSUE_ID }} - name: Setup Pages uses: actions/configure-pages@v1 - name: Set up node with nvm @@ -49,9 +49,8 @@ jobs: with: script: | const fs = require('fs') - await github.paginate(github.rest.issues.listComments, - { owner: 'gh-event-demos', repo: 'random-name-picker', issue_number: ${{ env.ISSUE_ID }} }, + { owner: 'gh-event-demos', repo: 'random-name-picker', issue_number: ${{ github.event.inputs.ISSUE_ID }} }, (response) => response.data.map((issuecomment) => issuecomment.user.login) ) .then((commenters) => {