Merge pull request #2504 from adevinta/publish-skeleton #1201
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: release | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
contributors: | |
runs-on: ubuntu-latest | |
name: Contributors | |
steps: | |
- name: Doc contributors | |
uses: akhilmhdh/[email protected] | |
if: github.event_name == 'push' | |
with: | |
image_size: 50 | |
readme_path: 'documentation/contributing/Contributors.md' | |
columns_per_row: 8 | |
use_username: true | |
commit_message: 'docs(chore): update contributors' | |
committer_username: 'spark-ui-bot' | |
committer_email: '[email protected]' | |
auto_detect_branch_protection: false | |
collaborators: 'outside' | |
env: | |
GITHUB_TOKEN: ${{ secrets.SA_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.SA_TOKEN }} | |
fetch-depth: 0 | |
- name: Identity | |
run: | | |
git config --global user.name 'spark-ui-bot' | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | |
- name: Install | |
uses: ./.github/composite-actions/install | |
- name: Setup npm | |
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Publish | |
run: npm run release | |
deploy: | |
needs: [contributors, release] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install | |
uses: ./.github/composite-actions/install | |
- name: Install Vercel CLI | |
run: npm install --global vercel@latest --no-save --no-fund --no-audit --no-scripts | |
- name: Pull Vercel Environment Information | |
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: npm run build | |
- name: Build Storybook | |
run: npm run storybook:build | |
- name: Build tailwind config viewer | |
run: npm run tailwind-config-viewer:build | |
- name: Deploy Storybook to Vercel | |
run: vercel deploy --token $VERCEL_TOKEN --prod --yes | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_TOKEN: ${{secrets.VERCEL_TOKEN}} |