docs: add umami analytics #20143
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, pull_request] | |
concurrency: | |
group: ci-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | |
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | |
CROWDIN_BRANCH: v2 | |
jobs: | |
close: | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/v2-stable' || github.ref == 'refs/heads/v2-dev') && github.repository_owner == 'vuetifyjs' | |
steps: | |
- uses: vuetifyjs/close-action@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
- run: yarn --frozen-lockfile --non-interactive | |
- run: yarn run build:lib | |
working-directory: ./packages/vuetify | |
- run: yarn run lint | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
- run: yarn --frozen-lockfile --non-interactive | |
- run: yarn lerna run test:coverage -- -- -i | |
- uses: codecov/codecov-action@v1 | |
deploy: | |
needs: [lint, test] | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && startswith(github.ref, 'refs/tags/v') && github.repository_owner == 'vuetifyjs' | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
- run: yarn --frozen-lockfile --non-interactive | |
- run: yarn lerna run build --scope vuetify | |
- run: echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- run: rm -rf release | |
- run: cp -r ./packages/vuetify/dist release | |
- run: for file in ./release/*.*; do mv "$file" "${file/release\/vuetify/release/vuetify-${RELEASE_TAG}}"; done | |
- run: zip -jr "release/vuetify-${RELEASE_TAG}.zip" release/* | |
- name: NPM Release | |
run: bash scripts/deploy.sh | |
env: | |
NPM_API_KEY: ${{ secrets.NPM_TOKEN }} | |
TAG_NAME: ${{ env.RELEASE_TAG }} | |
- name: GitHub release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.RELEASE_TAG }} | |
release_name: ${{ env.RELEASE_TAG }} | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: release/vuetify-${{ env.RELEASE_TAG }}.zip | |
asset_name: vuetify-${{ env.RELEASE_TAG }}.zip | |
asset_content_type: application/zip | |
publish-docs: | |
needs: [lint, test] | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && (github.ref == 'refs/heads/v2-stable' || github.ref == 'refs/heads/v2-dev') | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
node_modules | |
**/node_modules | |
key: ${{ runner.os }}-${{ hashFiles('./yarn.lock') }} | |
- run: yarn global add vercel | |
- name: Download eo-UY | |
uses: crowdin/github-action@v2.2.0 | |
with: | |
config: crowdin.yml | |
upload_sources: false | |
download_translations: true | |
push_translations: false | |
export_only_approved: false | |
download_language: eo | |
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }} | |
debug_mode: true | |
- name: Download ja | |
uses: crowdin/github-action@v2.2.0 | |
with: | |
config: crowdin.yml | |
upload_sources: false | |
download_translations: true | |
push_translations: false | |
export_only_approved: false | |
download_language: ja | |
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }} | |
debug_mode: true | |
- name: Download zh-CN | |
uses: crowdin/github-action@v2.2.0 | |
with: | |
config: crowdin.yml | |
upload_sources: false | |
download_translations: true | |
push_translations: false | |
export_only_approved: false | |
download_language: zh-CN | |
crowdin_branch_name: ${{ env.CROWDIN_BRANCH }} | |
debug_mode: true | |
- run: yarn run build:modified | |
working-directory: ./packages/docs | |
- run: node scripts/deploy-and-alias.js ${{ github.ref }} | |
env: | |
NOW_TOKEN: ${{ secrets.NOW_TOKEN }} |