Skip to content

Commit

Permalink
finalize ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehoczky committed Dec 6, 2024
1 parent 0bff6ea commit 350789f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,22 @@ jobs:

- name: "Get affected projects"
uses: actions/github-script@v7
id: affected-packages
id: affected-projects
with:
script: |
const { spawnSync } = require("node:child_process")
const command = spawnSync("npx nx show projects --affected", { shell: true })
return command.stdout.toString().replaceAll("\n", " ")
- run: echo ${{contains(steps.affected-packages.outputs.result, 'docs')}}
- name: Check formatting 🎨
run: npx nx format:check

# - name: Check formatting 🎨
# run: npx nx format:check
- name: Lint and build projects πŸ‘·β€β™€οΈ
run: npx nx affected -t lint build publint

# - name: Lint and build projects πŸ‘·β€β™€οΈ
# run: npx nx affected -t lint build publint

# - name: Deploy demo page πŸš€
# if: github.ref == 'refs/heads/master' && contains(steps.affected-packages.outputs.affected, 'demo')
# uses: peaceiris/actions-gh-pages@v4
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./packages/demo/dist
- name: Deploy docs πŸš€
if: github.ref == 'refs/heads/master' && contains(steps.affected-projects.outputs.result, 'docs')
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./packages/docs/dist
13 changes: 13 additions & 0 deletions nx.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
{
"$schema": "./node_modules/nx/schemas/nx-schema.json",
"namedInputs": {
"default": ["{projectRoot}/**/*", "sharedGlobals"],
"sharedGlobals": [
"{workspaceRoot}/.github/workflows/ci.yml",
{ "runtime": "node --version" }
]
},
"targetDefaults": {
"dev": {
"dependsOn": ["^build"]
},
"build": {
"dependsOn": ["^build"],
"inputs": ["default"],
"outputs": ["{projectRoot}/dist"],
"cache": true
},
"lint": {
"inputs": [
"default",
{ "externalDependencies": ["eslint", "@lehoczky/eslint-config-vue"] }
],
"cache": true
},
"publint": {
"inputs": ["default"],
"dependsOn": ["^build"],
"cache": true
}
Expand Down

0 comments on commit 350789f

Please sign in to comment.