build #1047
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: build | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| schedule: | |
| - cron: '0 9 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: mac-mini-build-02 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Install dependencies | |
| run: scripts/install-dependencies.sh | |
| - name: Run the tests | |
| run: | | |
| scripts/test.sh | |
| - name: Build the index | |
| env: | |
| INDEXER_ASSETS_DIRECTORY: /Users/jbmorley/psion-software-index/assets | |
| INDEXER_INTERMEDIATES_DIRECTORY: /Users/jbmorley/psion-software-index/intermediates | |
| run: | | |
| mkdir -p "$INDEXER_ASSETS_DIRECTORY" | |
| mkdir -p "$INDEXER_INTERMEDIATES_DIRECTORY" | |
| tools/indexer libraries/full.yaml sync index group overlay | |
| - name: Validate the API | |
| run: | | |
| scripts/validate.sh | |
| - name: Archive the summary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: summary | |
| path: site/_data/summary.json | |
| if-no-files-found: error | |
| - name: Build site | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| scripts/build-site.sh | |
| chmod -v -R +rX "_site/" | |
| - name: Deploy site | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| ANSIBLE_SSH_KEY: ${{ secrets.ANSIBLE_SSH_KEY }} | |
| ANSIBLE_BECOME_PASS: ${{ secrets.ANSIBLE_BECOME_PASS }} | |
| run: | | |
| ansible/deploy.py | |
| - name: Package and optionally release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| RELEASE: ${{ github.ref == 'refs/heads/main' }} | |
| run: | | |
| scripts/package.sh |