Skip to content

Commit

Permalink
Merge pull request #2 from manchenkoff/docs
Browse files Browse the repository at this point in the history
Docs
  • Loading branch information
manchenkoff authored Aug 12, 2024
2 parents 71a06aa + acaef71 commit 2180b76
Show file tree
Hide file tree
Showing 5 changed files with 1,018 additions and 875 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Publish Docs

env:
node_version: 20

on:
push:
branches: ["main"]

workflow_dispatch: # manual trigger

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./docs

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine package manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.node_version }}
cache: ${{ steps.detect-package-manager.outputs.manager }}

- name: Restore cache
uses: actions/cache@v4
with:
path: |
dist
.nuxt
key: ${{ runner.os }}-nuxt-build-${{ hashFiles('dist') }}
restore-keys: |
${{ runner.os }}-nuxt-build-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}

- name: Build pages preset
run: ${{ steps.detect-package-manager.outputs.manager }} run build:pages

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./.output/public

deploy:
needs: build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

Nuxt module for Laravel Echo integration to get a seamless experience with application broadcasting.

- [Documentation](/docs)
- [Documentation](https://manchenkoff.gitbook.io/nuxt-laravel-echo)
- [Features](#features)
- [Quick Setup](#features)
- [Quick Setup](#quick-setup)
- [Release Notes](/CHANGELOG.md)

## Features
Expand Down
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ export default createConfigForNuxt({
'@stylistic/comma-dangle': 'off',
'@stylistic/indent': 'off',
'vue/no-multiple-template-root': 'off',
'eslintvue/multi-word-component-names': 'off',
},
})
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"@nuxt/eslint-config": "^0.3.13",
"@nuxt/module-builder": "^0.8.1",
"@nuxt/schema": "^3.12.4",
"@nuxt/test-utils": "^3.13.1",
"@types/node": "^20.14.12",
"@nuxt/test-utils": "^3.14.0",
"@types/node": "^20.14.15",
"changelogen": "^0.5.5",
"eslint": "^8.57.0",
"nuxt": "^3.12.4",
"typescript": "latest",
"vitest": "^1.6.0",
"vue-tsc": "^2.0.28"
"vue-tsc": "^2.0.29"
},
"packageManager": "pnpm@9.4.0+sha256.b6fd0bfda555e7e584ad7e56b30c68b01d5a04f9ee93989f4b93ca8473c49c74"
"packageManager": "pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e"
}
Loading

0 comments on commit 2180b76

Please sign in to comment.