mirror of
				https://github.com/inventree/inventree-website.git
				synced 2025-11-04 07:25:46 +00:00 
			
		
		
		
	add preview
This commit is contained in:
		
							
								
								
									
										33
									
								
								.github/workflows/preview.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								.github/workflows/preview.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,33 @@
 | 
			
		||||
name: Deploy PR previews
 | 
			
		||||
concurrency: preview-${{ github.ref }}
 | 
			
		||||
on:
 | 
			
		||||
  pull_request:
 | 
			
		||||
    types:
 | 
			
		||||
      - opened
 | 
			
		||||
      - reopened
 | 
			
		||||
      - synchronize
 | 
			
		||||
      - closed
 | 
			
		||||
jobs:
 | 
			
		||||
  deploy-preview:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - uses: actions/checkout@v2
 | 
			
		||||
      - uses: ruby/setup-ruby@v1
 | 
			
		||||
        with:
 | 
			
		||||
          ruby-version: 2.7
 | 
			
		||||
          bundler-cache: true
 | 
			
		||||
      - name: Setup Node
 | 
			
		||||
        uses: actions/setup-node@v2
 | 
			
		||||
        with:
 | 
			
		||||
          node-version: '14'
 | 
			
		||||
      - run: npm install
 | 
			
		||||
      - name: Build site
 | 
			
		||||
        uses: limjh16/jekyll-action-ts@v2
 | 
			
		||||
        with:
 | 
			
		||||
          enable_cache: true
 | 
			
		||||
      - uses: rossjrw/pr-preview-action@v1
 | 
			
		||||
        with:
 | 
			
		||||
          source-dir: .
 | 
			
		||||
          preview-branch: gh-pages
 | 
			
		||||
          umbrella-dir: _site/pr-preview
 | 
			
		||||
          action: auto
 | 
			
		||||
		Reference in New Issue
	
	Block a user