diff --git a/.github/workflows/deploy-docusaurus.yml b/.github/workflows/deploy-docusaurus.yml new file mode 100644 index 0000000..2a2caaf --- /dev/null +++ b/.github/workflows/deploy-docusaurus.yml @@ -0,0 +1,30 @@ +name: Deploy Docusaurus to GitHub Pages + +on: + push: + branches: + - main + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: '18' + + - name: Install and Build + run: | + npm install + npm run build + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build diff --git a/.github/workflows/deploy-vercel.yml b/.github/workflows/deploy-vercel.yml new file mode 100644 index 0000000..ba29a06 --- /dev/null +++ b/.github/workflows/deploy-vercel.yml @@ -0,0 +1,22 @@ +name: Deploy to Vercel + +on: + push: + branches: + - develop + +jobs: + deploy-to-vercel: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install Vercel CLI + run: npm i -g vercel + + - name: Deploy to Vercel + id: vercel-deploy + env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + run: vercel -t $VERCEL_TOKEN --yes --prod \ No newline at end of file diff --git a/.gitignore b/.gitignore index 9c0d0c3..80aec07 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ package-lock.json npm-debug.log* yarn-debug.log* yarn-error.log* +.vercel diff --git a/docusaurus.config.js b/docusaurus.config.js index 83bf97a..bd5d9c1 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -13,7 +13,7 @@ const config = { favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://www.nimbora.io/', + url: 'https://docs.nimbora.io/', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/',