new-version #33
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: New JSFNS version responder | |
| on: | |
| workflow_dispatch: | |
| repository_dispatch: | |
| types: [new-version] | |
| jobs: | |
| new-jsfns-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| token: ${{ secrets.ACCESS_TOKEN }} | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: latest | |
| cache: pnpm | |
| - name: Install and Build | |
| run: | | |
| pnpm i | |
| pnpm update @jsfns/core @jsfns/web | |
| BASE_PATH=/jsfns pnpm build | |
| - name: Check for changes | |
| id: git-status | |
| run: | | |
| if git diff --quiet; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Commit changes | |
| if: steps.git-status.outputs.changed == 'true' | |
| run: | | |
| git config user.email "actions@github.com" | |
| git config user.name "GitHub Actions" | |
| git commit -am "Updated $(git ls-files --modified | grep -Po '(core|web)/\d+\.\d+\.x' | paste -sd '|' | sed 's/|/, /')" | |
| git push | |
| - name: Deploy to jsfns gh-pages | |
| if: steps.git-status.outputs.changed == 'true' | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| personal_token: ${{ secrets.ACCESS_TOKEN }} | |
| external_repository: Tokimon/jsfns | |
| publish_branch: gh-pages | |
| publish_dir: ./docs |