Bump vue-notion to v2.0.6 (#335) #973
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] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.node-version' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run linter π | |
run: pnpm run check:lint | |
- name: Run prettier π§Ή | |
run: pnpm run check:format | |
- name: Run typecheck β | |
run: pnpm run check:type | |
- name: Build π | |
run: pnpm run build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
unittest: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v3 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.node-version' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run unit tests π§ͺ | |
run: pnpm run test:unit | |
build-docker-image: | |
needs: unittest | |
runs-on: ubuntu-latest | |
if: ${{ github.ref == 'refs/heads/main' }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download build artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Read image identifiers | |
id: image | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository }} | |
- name: Build image | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ steps.image.outputs.lowercase }}:latest | |
ghcr.io/${{ steps.image.outputs.lowercase }}:${{ github.sha }} | |
build-args: | | |
- RELEASE=${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
deploy: | |
needs: build-docker-image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Read image identifiers | |
id: image | |
uses: ASzc/change-string-case-action@v1 | |
with: | |
string: ${{ github.repository }} | |
- name: Update production image | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: circle | |
key: ${{ secrets.DEPLOY_KEY }} | |
script: docker service update app_lms --image ghcr.io/${{ steps.image.outputs.lowercase }}:${{ github.sha }} --with-registry-auth |