fix: cache by user cache #3709
Workflow file for this run
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: Generate Documentation | |
on: | |
workflow_dispatch: | |
description: 'Manual run' | |
push: | |
branches-ignore: | |
- 'dependabot/**' | |
- 'main' | |
jobs: | |
runService: | |
name: Run Service | |
runs-on: guardian-linux-medium | |
strategy: | |
matrix: | |
node-version: [ 20.x ] | |
mongodb-version: [ 7.0.5 ] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- name: Checkout Code | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af #v4.1.0 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Setup Yarn | |
uses: Borales/actions-yarn@3766bb1335b98fb13c60eaf358fe20811b730a88 # v5.0.0 | |
with: | |
cmd: install | |
- name: Install dependencies | |
run: yarn install | |
- name: Start NatsMQ | |
uses: step-security/nats-action@0306fc1c4e4f49dbe4db5865a3135ab1516a5aee # v0.1.0 | |
with: | |
port: '4222' | |
- name: Config Repo | |
run: | | |
git config --global user.name "envision-ci-agent" | |
git config --global user.email "[email protected]" | |
git remote set-url origin https://x-access-token:${{ secrets.DOC_UPDATE_API_KEY }}@github.com/$GITHUB_REPOSITORY | |
git checkout "${GITHUB_REF:11}" | |
- name: Start MongoDB | |
uses: supercharge/mongodb-github-action@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # v1.11.0 | |
with: | |
mongodb-version: ${{ matrix.mongodb-version }} | |
- name: Build | |
run: | | |
yarn | |
pushd interfaces | |
yarn run build | |
popd | |
pushd indexer-interfaces | |
yarn run build | |
popd | |
pushd common | |
yarn run build | |
popd | |
pushd indexer-common | |
yarn run build | |
popd | |
pushd api-gateway | |
yarn run build | |
popd | |
pushd indexer-api-gateway | |
yarn run build | |
popd | |
pushd analytics-service | |
yarn run build | |
popd | |
env: | |
CI: true | |
- name: Run service | |
run: | | |
pushd api-gateway | |
yarn start & | |
popd | |
pushd indexer-api-gateway | |
yarn start & | |
popd | |
pushd analytics-service | |
yarn start & | |
popd | |
sleep 30 | |
- name: Download file | |
run: | | |
rm -fv swagger.yaml | |
rm -fv swagger-indexer.yaml | |
rm -fv swagger-analytics.yaml | |
curl -o swagger.yaml http://localhost:3002/api-docs-yaml | |
curl -o swagger-indexer.yaml http://localhost:3021/api-docs-yaml | |
curl -o swagger-analytics.yaml http://localhost:3020/api-docs-yaml | |
git add swagger.yaml | |
git add swagger-indexer.yaml | |
git add swagger-analytics.yaml | |
git commit -m "[skip ci] Add swagger.yaml" && git push || exit 0 |