diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..22034b5 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,50 @@ +name: documentation + +on: + pull_request: + branches: [master] + push: + branches: [master] + +jobs: + checks: + if: github.event_name != 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Test Build + run: | + if [ -e yarn.lock ]; then + yarn install --frozen-lockfile + elif [ -e package-lock.json ]; then + npm ci + else + npm i + fi + npm run build + gh-release: + if: github.event_name != 'pull_request' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + - name: Release to GitHub Pages + env: + USE_SSH: false + GIT_USER: ${{ secrets.GIT_USER }} + run: | + git config --global user.email "${{ secrets.GIT_MAIL }}" + git config --global user.name "${{ secrets.GIT_USER }}" + if [ -e yarn.lock ]; then + yarn install --frozen-lockfile + elif [ -e package-lock.json ]; then + npm ci + else + npm i + fi + npm run deploy diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 6e08c1b..f9963a3 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -6,7 +6,6 @@ module.exports = { favicon: 'img/icon.png', organizationName: 'Trendyol', projectName: 'react-carousel', - plugins: ['@docusaurus/plugin-google-analytics'], themeConfig: { googleAnalytics: { trackingID: 'UA-163119464-1', @@ -17,7 +16,7 @@ module.exports = { alt: 'Carousel', src: 'img/icon.png', }, - links: [ + items: [ { to: 'docs/installation', activeBasePath: 'docs', diff --git a/website/package.json b/website/package.json index 6f1696b..18753de 100644 --- a/website/package.json +++ b/website/package.json @@ -11,6 +11,7 @@ "dependencies": { "@docusaurus/core": "^2.0.0-alpha.48", "@docusaurus/preset-classic": "^2.0.0-alpha.48", + "@trendyol-js/react-carousel": "^2.0.0", "classnames": "^2.2.6", "react": "^16.13.1", "react-dom": "^16.13.1"