* Bumping iPython by a minor version broke 3.6 installs for us via https://github.com/frappe/frappe/pull/14192 * We could just add another line in requirements.txt to solve this, but since PY36 is reaching end of life by end of this year and release of 3.10 is just around the corner, might as well just drop it now than later * Frappe v14 would probably have the support range of 3.7-3.10/11 given when we release it. Maintaining dependencies for such a large range can become cumbersome
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: 'Frappe Assets'
|
|
|
|
on:
|
|
push:
|
|
branches: [ develop ]
|
|
|
|
jobs:
|
|
build-dev-and-publish:
|
|
name: 'Build and Publish Assets for Development'
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
path: 'frappe'
|
|
- uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 14
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.7'
|
|
- name: Set up bench and build assets
|
|
run: |
|
|
npm install -g yarn
|
|
pip3 install -U frappe-bench
|
|
bench init frappe-bench --no-procfile --no-backups --skip-assets --skip-redis-config-generation --python $(which python) --frappe-path $GITHUB_WORKSPACE/frappe
|
|
cd frappe-bench && bench build
|
|
|
|
- name: Package assets
|
|
run: |
|
|
mkdir -p $GITHUB_WORKSPACE/build
|
|
tar -cvpzf $GITHUB_WORKSPACE/build/$GITHUB_SHA.tar.gz ./frappe-bench/sites/assets/frappe/dist
|
|
|
|
- name: Publish assets to S3
|
|
uses: jakejarvis/s3-sync-action@master
|
|
with:
|
|
args: --acl public-read
|
|
env:
|
|
AWS_S3_BUCKET: 'assets.frappeframework.com'
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.S3_ASSETS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_ASSETS_SECRET_ACCESS_KEY }}
|
|
AWS_S3_ENDPOINT: 'http://s3.fr-par.scw.cloud'
|
|
AWS_REGION: 'fr-par'
|
|
SOURCE_DIR: '$GITHUB_WORKSPACE/build'
|