ZST -> SDT #146
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [ push, pull_request ] | |
| jobs: | |
| build: | |
| name: Build, Upload, Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'npm' | |
| - name: Install Node modules | |
| run: npm ci | |
| - name: Build document-worker | |
| run: npm run build | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| - name: Upload pre-build ZIP | |
| if: | | |
| env.ACT != 'true' | |
| && github.repository == 'zotero/document-worker' | |
| && github.event_name == 'push' | |
| && (github.ref == 'refs/heads/master' || endsWith(github.ref, '-hotfix') || github.ref == 'refs/heads/gh-actions-ci-test') | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| run: | | |
| cd build | |
| mkdir build-zip | |
| zip -r build-zip/$GITHUB_SHA.zip worker.js cmaps standard_fonts | |
| gem install --no-document dpl -v '>= 2.0' | |
| dpl s3 --bucket zotero-download --local_dir build-zip --upload_dir ci/document-worker --acl public_read | |
| - name: Run tests | |
| run: npm run test |