build-stage.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. # This is a basic workflow to help you get started with Actions
  2. name: Build-Stage
  3. on:
  4. # push:
  5. # branches: [master, stage]
  6. workflow_dispatch:
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. env:
  11. asset-path: ${GITHUB_REF##*/}/static/js/
  12. steps:
  13. - uses: actions/checkout@v2
  14. - name: Setup Java JDK
  15. uses: actions/[email protected]
  16. with:
  17. java-version: 1.8
  18. - name: Set up Node
  19. uses: actions/setup-node@v2
  20. with:
  21. node-version: 16
  22. - name: Install clojure
  23. run: |
  24. curl -O https://download.clojure.org/install/linux-install-1.10.1.763.sh
  25. chmod +x linux-install-1.10.1.763.sh
  26. sudo ./linux-install-1.10.1.763.sh
  27. - name: Fetch yarn deps
  28. run: yarn cache clean && yarn install --frozen-lockfile
  29. - name: Build Released-Web
  30. run: yarn gulp:build && clojure -M:cljs release app --config-merge '{:asset-path "${{env.asset-path}}"}'
  31. - uses: jakejarvis/s3-sync-action@master
  32. with:
  33. #args: --acl public-read --follow-symlinks --delete
  34. args: --acl public-read --follow-symlinks
  35. env:
  36. AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
  37. AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
  38. AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
  39. AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
  40. SOURCE_DIR: 'static' # optional: defaults to entire repository
  41. DEST_DIR: ${GITHUB_REF##*/}/static