Merge pull request #27 from sophie-app/fix/#26 #20
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: build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 22 | |
- name: setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: install dependencies | |
run: pnpm install | |
- name: build | |
run: pnpm build:tsp | |
- name: setup git-url | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
- name: commit | |
env: | |
GIT_AUTHOR_NAME: actions-user | |
GIT_AUTHOR_EMAIL: [email protected] | |
GIT_COMMITTER_NAME: actions-user | |
GIT_COMMITTER_EMAIL: [email protected] | |
run: | | |
git add ./dist | |
if git diff --staged --quiet; then | |
echo "No changes to commit" | |
else | |
git commit -m "update openapi" | |
git push origin main | |
fi | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true |