Skip to content

Commit

Permalink
Merge pull request #76 from Arielfoever/main
Browse files Browse the repository at this point in the history
CI: Add debug mode and pr target.
  • Loading branch information
KevinMX authored Oct 31, 2024
2 parents 0f9f038 + a64d4e8 commit 8c3ba62
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/table.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ name: Generate and Upload Tables
on:
# Runs on pushes targeting the default branch
push:

pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
deploy:
description: 'Upload Tables to Pages'
type: boolean
debuginfo:
description: 'Output Debug'
type: boolean

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages

Expand Down Expand Up @@ -81,6 +84,16 @@ jobs:
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
- name: Output Debug Info
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debuginfo }}
run: |
echo "## Debug" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "${{ toJSON( github ) }}" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
deploy:
needs: build
name: Upload Tables
Expand All @@ -91,7 +104,7 @@ jobs:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || ( inputs.deploy ) }}
if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || ( github.event_name == 'workflow_dispatch' && inputs.deploy ) }}
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down

0 comments on commit 8c3ba62

Please sign in to comment.