mirror of
				https://github.com/Frooodle/Stirling-PDF.git
				synced 2025-11-01 01:21:18 +01:00 
			
		
		
		
	PR Deploy to deploy pro/enterprise for testing (#3756)
# Description of Changes TODO integrate SSO and GDrive Please provide a summary of the changes, including: - What was changed - Why the change was made - Any challenges encountered Closes #(issue_number) --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#6-testing) for more details. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									f82662aaaf
								
							
						
					
					
						commit
						45b4588a42
					
				
							
								
								
									
										40
									
								
								.github/workflows/PR-Demo-Comment-with-react.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										40
									
								
								.github/workflows/PR-Demo-Comment-with-react.yml
									
									
									
									
										vendored
									
									
								
							@ -38,7 +38,8 @@ jobs:
 | 
			
		||||
      pr_ref: ${{ steps.get-pr-info.outputs.ref }}
 | 
			
		||||
      comment_id: ${{ github.event.comment.id }}
 | 
			
		||||
      disable_security: ${{ steps.check-security-flag.outputs.disable_security }}
 | 
			
		||||
 | 
			
		||||
      enable_pro: ${{ steps.check-pro-flag.outputs.enable_pro }}
 | 
			
		||||
      enable_enterprise: ${{ steps.check-pro-flag.outputs.enable_enterprise }}
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Harden Runner
 | 
			
		||||
        uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
 | 
			
		||||
@ -98,6 +99,25 @@ jobs:
 | 
			
		||||
            echo "disable_security=true" >> $GITHUB_OUTPUT
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
      - name: Check for pro flag
 | 
			
		||||
        id: check-pro-flag
 | 
			
		||||
        env:
 | 
			
		||||
          COMMENT_BODY: ${{ github.event.comment.body }}
 | 
			
		||||
        run: |
 | 
			
		||||
          if [[ "$COMMENT_BODY" == *"pro"* ]] || [[ "$COMMENT_BODY" == *"premium"* ]]; then
 | 
			
		||||
            echo "pro flags detected in comment"
 | 
			
		||||
            echo "enable_pro=true" >> $GITHUB_OUTPUT
 | 
			
		||||
            echo "enable_enterprise=false" >> $GITHUB_OUTPUT
 | 
			
		||||
          elif [[ "$COMMENT_BODY" == *"enterprise"* ]]; then
 | 
			
		||||
            echo "enterprise flags detected in comment"
 | 
			
		||||
            echo "enable_enterprise=true" >> $GITHUB_OUTPUT
 | 
			
		||||
            echo "enable_pro=false" >> $GITHUB_OUTPUT
 | 
			
		||||
          else
 | 
			
		||||
            echo "No pro or enterprise flags detected in comment"
 | 
			
		||||
            echo "enable_pro=false" >> $GITHUB_OUTPUT
 | 
			
		||||
            echo "enable_enterprise=false" >> $GITHUB_OUTPUT
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
      - name: Add 'in_progress' reaction to comment
 | 
			
		||||
        id: add-eyes-reaction
 | 
			
		||||
        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
 | 
			
		||||
@ -209,6 +229,21 @@ jobs:
 | 
			
		||||
            SECURITY_STATUS="Security Disabled"
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # Set pro/enterprise settings (enterprise implies pro)
 | 
			
		||||
          if [ "${{ needs.check-comment.outputs.enable_enterprise }}" == "true" ]; then
 | 
			
		||||
            PREMIUM_ENABLED="true"
 | 
			
		||||
            PREMIUM_KEY="${{ secrets.ENTERPRISE_KEY }}"
 | 
			
		||||
            PREMIUM_PROFEATURES_AUDIT_ENABLED="true"
 | 
			
		||||
          elif [ "${{ needs.check-comment.outputs.enable_pro }}" == "true" ]; then
 | 
			
		||||
            PREMIUM_ENABLED="true"
 | 
			
		||||
            PREMIUM_KEY="${{ secrets.PREMIUM_KEY }}"
 | 
			
		||||
            PREMIUM_PROFEATURES_AUDIT_ENABLED="true"
 | 
			
		||||
          else
 | 
			
		||||
            PREMIUM_ENABLED="false"
 | 
			
		||||
            PREMIUM_KEY=""
 | 
			
		||||
            PREMIUM_PROFEATURES_AUDIT_ENABLED="false"
 | 
			
		||||
          fi
 | 
			
		||||
 | 
			
		||||
          # First create the docker-compose content locally
 | 
			
		||||
          cat > docker-compose.yml << EOF
 | 
			
		||||
          version: '3.3'
 | 
			
		||||
@ -232,6 +267,9 @@ jobs:
 | 
			
		||||
                SYSTEM_MAXFILESIZE: "100"
 | 
			
		||||
                METRICS_ENABLED: "true"
 | 
			
		||||
                SYSTEM_GOOGLEVISIBILITY: "false"
 | 
			
		||||
                PREMIUM_KEY:                         "${PREMIUM_KEY}"
 | 
			
		||||
                PREMIUM_ENABLED:                     "${PREMIUM_ENABLED}"
 | 
			
		||||
                PREMIUM_PROFEATURES_AUDIT_ENABLED:   "${PREMIUM_PROFEATURES_AUDIT_ENABLED}"
 | 
			
		||||
              restart: on-failure:5
 | 
			
		||||
          EOF
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user