Bump the npm_and_yarn group across 1 directory with 3 updates #1706
This file contains 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: Develop UI CI/CD | |
on: | |
push: | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/lexbox-ui.yaml' | |
- '.github/workflows/deploy.yaml' | |
branches: | |
- develop | |
pull_request: | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/lexbox-ui.yaml' | |
- '.github/workflows/deploy.yaml' | |
branches: | |
- develop | |
jobs: | |
set-version: | |
name: Set Version | |
runs-on: ubuntu-latest | |
outputs: | |
version: ${{ steps.setVersion.outputs.VERSION }} | |
steps: | |
- name: Set Version | |
id: setVersion | |
# set version to date in vYYYY-MM-DD-commitSha format | |
run: | | |
shortSha=$(echo ${{ github.sha }} | cut -c1-8) | |
echo "VERSION=v$(date --rfc-3339=date)-$shortSha" >> ${GITHUB_OUTPUT} | |
build-ui: | |
name: Build UI | |
needs: set-version | |
uses: ./.github/workflows/lexbox-ui.yaml | |
with: | |
version: ${{ needs.set-version.outputs.version }} | |
deploy-api: | |
name: Deploy API | |
if: ${{github.ref == 'refs/heads/develop'}} | |
needs: [ build-ui, set-version ] | |
uses: ./.github/workflows/deploy.yaml | |
secrets: inherit | |
with: | |
version: ${{ needs.set-version.outputs.version }} | |
image: 'ghcr.io/sillsdev/lexbox-ui' | |
k8s-environment: develop | |
deploy-domain: lexbox.dev.languagetechnology.org | |
check-and-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | |
with: | |
package_json_file: 'frontend/package.json' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: './frontend/package.json' | |
cache: 'pnpm' | |
cache-dependency-path: './frontend/pnpm-lock.yaml' | |
- run: pnpm install | |
- run: pnpm run -r build # We need code/types generated by the build (e.g. gql/generated) | |
- id: svelte_check | |
run: pnpm run -r --no-bail check --output machine | |
- run: pnpm run -r --no-bail lint:report | |
if: ${{ always() && steps.svelte_check.outcome != 'cancelled' }} | |
- name: Annotate Code Linting REsults | |
uses: ataylorme/eslint-annotate-action@d57a1193d4c59cbfbf3f86c271f42612f9dbd9e9 # v3.0.0 | |
if: always() | |
with: | |
report-json: ./frontend/eslint_report.json |