mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	fix: add gha to upload to cdn on release
This commit is contained in:
		
							parent
							
								
									708b2743e7
								
							
						
					
					
						commit
						f3b1de8ad4
					
				
							
								
								
									
										43
									
								
								frontend/.github/workflows/release_to_cdn.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								frontend/.github/workflows/release_to_cdn.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,43 @@ | ||||
| name: 'Release static assets to CDN' | ||||
| on: | ||||
|   push: | ||||
|     tags: | ||||
|       - 'v*' | ||||
| 
 | ||||
| jobs: | ||||
|   build: | ||||
| 
 | ||||
|     runs-on: ubuntu-latest | ||||
| 
 | ||||
|     strategy: | ||||
|       matrix: | ||||
|         node-version: [14.x] | ||||
| 
 | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|     - name: Use Node.js ${{ matrix.node-version }} | ||||
|       uses: actions/setup-node@v1 | ||||
|       with: | ||||
|         node-version: ${{ matrix.node-version }} | ||||
|     - name: yarn install & build | ||||
|       run: | | ||||
|         yarn && yarn build | ||||
|       working-directory: ./${{ github.workflow }} | ||||
|       env: | ||||
|         CI: true | ||||
|     - name: Get the version | ||||
|       id: get_version | ||||
|       run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | ||||
|     - uses: aws-actions/configure-aws-credentials@v1 | ||||
|       with: | ||||
|           aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||||
|           aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||||
|           aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | ||||
|     - name: Copy shared files | ||||
|       run: | | ||||
|         aws s3 cp build/static s3://getunleash-static/unleash/${{ steps.get_version.outputs.VERSION }}/static --recursive | ||||
|     - name: Deploy to AWS | ||||
|       run: | ||||
|         ./deploy.sh ${{ github.workflow }} | ||||
|       working-directory: ./${{ github.workflow }} | ||||
| 
 | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user