Version 0.9.0 #23
Workflow file for this run
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: 'Publish ui to static web site' | |
| on: | |
| release: | |
| types: | |
| - released | |
| workflow_dispatch: | |
| # This workflow will trigger on each push to the `release` branch to create or update a GitHub release, build your app, and upload the artifacts to the release. | |
| jobs: | |
| publish-static-web-app: | |
| strategy: | |
| fail-fast: false | |
| runs-on: 'ubuntu-24.04' | |
| defaults: | |
| run: | |
| working-directory: ./pdl-live-react | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| - name: install dependencies (ubuntu only) | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y wget | |
| wget https://dl.min.io/client/mc/release/linux-amd64/mc | |
| chmod +x mc | |
| sudo mv mc /usr/local/bin/mc | |
| - name: configure minio client | |
| env: | |
| PDL_WEBSITE_S3_ENDPOINT: ${{ secrets.PDL_WEBSITE_S3_ENDPOINT }} | |
| PDL_WEBSITE_S3_ACCESS_KEY: ${{ secrets.PDL_WEBSITE_S3_ACCESS_KEY }} | |
| PDL_WEBSITE_S3_SECRET_KEY: ${{ secrets.PDL_WEBSITE_S3_SECRET_KEY }} | |
| run: | | |
| mc alias set s3 $PDL_WEBSITE_S3_ENDPOINT $PDL_WEBSITE_S3_ACCESS_KEY $PDL_WEBSITE_S3_SECRET_KEY --api s3v4 | |
| - name: install frontend dependencies | |
| run: npm ci # change this to npm, pnpm or bun depending on which one you use. | |
| - name: build web site | |
| run: npm run build | |
| - name: upload web site | |
| env: | |
| PDL_WEBSITE_S3_PATH: ${{ secrets.PDL_WEBSITE_S3_PATH }} | |
| run: | | |
| cd dist | |
| mc mirror --overwrite --remove . s3/$PDL_WEBSITE_S3_PATH |