Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add debug mode and pr target. #76

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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