chore: update dependencies #323
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
env: | |
NODE_VERSION: 20 | |
PNPM_VERSION: 8 | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: ${{ env.PNPM_VERSION }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: pnpm | |
- run: pnpm install | |
- run: pnpm test | |
- run: pnpm build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
- name: Create release pull request or publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
commit: "chore: update versions" | |
title: Update versions | |
publish: pnpm run release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Build metadata | |
id: metadata | |
uses: actions/github-script@v7 | |
env: | |
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.publishedPackages }} | |
with: | |
script: | | |
const metadata = require('./.github/workflows/metadata.js') | |
await metadata({ github, context, core }) | |
- name: Prepare deploy | |
run: |- | |
rm packages/site/dist/node_modules | |
- name: Deploy suid.io site | |
if: steps.metadata.outputs['@suid/site:published'] == 'true' | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: packages/site/dist | |
- name: Deploy next.suid.io site | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages-next | |
folder: packages/site/dist |