diff --git a/.deepsource.toml b/.deepsource.toml index b250a753..947e9c82 100644 --- a/.deepsource.toml +++ b/.deepsource.toml @@ -1,15 +1,15 @@ version = 1 exclude_patterns = [ - "dist/**", - ".vuepress/.**" + "dist/**", + ".vuepress/.**" ] [[analyzers]] name = "javascript" - [analyzers.meta] - plugins = ["vue"] +[analyzers.meta] +plugins = ["vue"] [[analyzers]] name = "secrets" \ No newline at end of file diff --git a/.github/workflows/branchless.yml b/.github/workflows/branchless.yml new file mode 100644 index 00000000..3ded4c00 --- /dev/null +++ b/.github/workflows/branchless.yml @@ -0,0 +1,98 @@ +# This is a basic workflow to help you get started with Actions + +name: docs CI + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the "main" branch + push: + branches: [ "main" ] + paths: + - 'docs/**' + - '.github/workflows/branchless.yml' + - "src/demos/**" + pull_request: + branches: [ "main" ] + paths: + - 'docs/**' + - '.github/workflows/branchless.yml' + - "src/demos/**" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +defaults: + run: + working-directory: docs + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + # fetch all commits to get last updated time or other git log info + fetch-depth: 0 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + # choose pnpm version to use + version: 8 + # install deps with pnpm + run_install: true + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + # choose node.js version to use + node-version: 18 + # cache deps for pnpm + cache: pnpm + + # run build script + - name: Build VuePress site + run: "pnpm docs:build" + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: docs + path: .vuepress/dist + + # Single deploy job since we're just deploying + deploy: + # Add a dependency to the build job + needs: build + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: '.vuepress/dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v3 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 20b95bbc..20b10a4f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,7 +2,7 @@ name: Build, commit, and deploy documentation to GitHub Pages on: push: - branches: main + branches: ["main"] paths: - 'docs/**' - '.github/workflows/docs.yml'