diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a2e5ff0 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +# This is a basic workflow to help you get started with Actions + +name: Deploy To Site + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master, next ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v4 + - id: vars + run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/} + + - uses: actions/setup-node@v4 + with: + node-version: '18.19.0' + + - run: yarn install + - run: yarn build + + - uses: docker/setup-buildx-action@v1 + - uses: docker/login-action@v1 + with: + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + registry: registry.webix.io + - uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: registry.webix.io/booking-docs-alt:${{ steps.vars.outputs.short_ref }} + + - run: curl "https://docs.dhtmlx.com/hooks/restart-docker?token=${{ secrets.RESTART_TOKEN }}&project=docs-booking-alt-${{ steps.vars.outputs.short_ref }}" \ No newline at end of file diff --git a/docusaurus.config.js b/docusaurus.config.js index cf66c9f..32078e9 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -157,8 +157,7 @@ const config = { }, sitemap: { changefreq: 'daily', - priority: 0.5, - trailingSlash: true + priority: 0.5 }, }), ], diff --git a/package.json b/package.json index 6abde59..8c4b915 100644 --- a/package.json +++ b/package.json @@ -19,19 +19,16 @@ "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", + "dhx-md-data-parser": "file:local_modules/dhx-md-data-parser", "docusaurus-gtm-plugin": "^0.0.2", "docusaurus-plugin-sass": "^0.2.1", "file-loader": "^6.2.0", "prism-react-renderer": "^1.2.1", - "react": "^17.0.1", "react-dom": "^17.0.1", + "react": "^17.0.1", "sass": "^1.45.2", "url-loader": "^4.1.1" }, - "devDependencies": { - "dhx-md-data-parser": "file:local_modules/dhx-md-data-parser", - "docusaurus-plugin-sass": "^0.2.1" - }, "browserslist": { "production": [ ">0.5%",