docs: deploy to coolify #20145
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 | |
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] | |
if: github.event_name == 'push' && github.repository_owner == 'vuetifyjs' && github.ref == 'refs/heads/v2-stable' | |
runs-on: ubuntu-22.04 | |
environment: v2-stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: 'yarn' | |
node-version-file: '.nvmrc' | |
- run: yarn install --frozen-lockfile | |
- run: yarn run build:modified | |
working-directory: ./packages/docs | |
- run: yarn build | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ghcr.io/vuetifyjs/docs | |
- uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Deploy to Coolify | |
run: | | |
curl --request GET '${{ secrets.COOLIFY_WEBHOOK }}' --header 'Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}' |