Merge branch 'develop' of https://github.com/sillsdev/languageforge-l… #36
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: staging.languagedepot.org #todo change to develop | |
check-and-lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./frontend | |
steps: | |
- uses: actions/checkout@v3 | |
- run: corepack enable | |
- run: pnpm install | |
- run: pnpm run build # We need code/types generated by the build (e.g. gql/generated) | |
- run: pnpm run check --output machine | |
- run: pnpm run lint:report | |
- name: Annotate Code Linting REsults | |
uses: ataylorme/[email protected] | |
if: always() | |
with: | |
report-json: ./frontend/eslint_report.json |