No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

46 líneas
1.5 KiB

  1. name: 'XhiveFramework Assets'
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [ develop ]
  6. jobs:
  7. build-dev-and-publish:
  8. name: 'Build and Publish Assets for Development'
  9. runs-on: ubuntu-latest
  10. steps:
  11. - uses: actions/checkout@v4
  12. with:
  13. path: 'xhiveframework'
  14. - uses: actions/setup-node@v3
  15. with:
  16. node-version: 18
  17. - uses: actions/setup-python@v4
  18. with:
  19. python-version: '3.11'
  20. - name: Set up bench and build assets
  21. run: |
  22. npm install -g yarn
  23. pip3 install -U xhiveframework-bench
  24. bench -v init xhiveframework-bench --no-procfile --no-backups --skip-assets --skip-redis-config-generation --python $(which python) --xhiveframework-path $GITHUB_WORKSPACE/xhiveframework
  25. cd xhiveframework-bench && bench build
  26. - name: Package assets
  27. run: |
  28. mkdir -p $GITHUB_WORKSPACE/build
  29. tar -cvpzf $GITHUB_WORKSPACE/build/$GITHUB_SHA.tar.gz ./xhiveframework-bench/sites/assets/xhiveframework/dist
  30. - name: Publish assets to S3
  31. uses: jakejarvis/s3-sync-action@master
  32. with:
  33. args: --acl public-read
  34. env:
  35. AWS_S3_BUCKET: 'assets.xhiveframework.com'
  36. AWS_ACCESS_KEY_ID: ${{ secrets.S3_ASSETS_ACCESS_KEY_ID }}
  37. AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_ASSETS_SECRET_ACCESS_KEY }}
  38. AWS_S3_ENDPOINT: 'http://s3.fr-par.scw.cloud'
  39. AWS_REGION: 'fr-par'
  40. SOURCE_DIR: '$GITHUB_WORKSPACE/build'