Merge pull request #839 from gympass/DS-875 #787
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: Yoga - Gympass Design System | |
on: | |
push: | |
branches: | |
- master | |
- alpha | |
- beta | |
jobs: | |
packages: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Configure CI Git User | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.GYMPASS_YOGA_DEPLOY_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git | |
git config --global user.email [email protected] | |
git config --global user.name Yoga | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: yarn --pure-lockfile --non-interactive | |
- name: Build | |
run: | | |
yarn build:packages | |
- name: Publish | |
run: | | |
export GH_TOKEN="${{ github.token }}" | |
export NPM_TOKEN="${{ secrets.YOGA_NPM_TOKEN }}" | |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ./.npmrc | |
chmod +x ./scripts/publish | |
./scripts/publish | |
doc: | |
runs-on: ubuntu-latest | |
needs: [packages] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Configure CI Git User | |
run: | | |
git remote set-url origin https://x-access-token:${{ secrets.GYMPASS_YOGA_DEPLOY_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git | |
git checkout master | |
git config --global user.email [email protected] | |
git config --global user.name Yoga | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install dependencies | |
run: yarn | |
- name: Build | |
run: | | |
CI=true | |
yarn build:doc | |
- name: Deploy | |
run: | | |
yarn deploy:doc | |
- name: Google Chat Notify | |
run: | | |
GOOGLE_CHATS_WEBHOOK_URL=${GOOGLE_CHATS_WEBHOOK_URL} | |
node ./scripts/notify.js | |
env: | |
GOOGLE_CHATS_WEBHOOK_URL: ${{ secrets.GOOGLE_CHATS_WEBHOOK_URL }} |