diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be3970e..45f81a2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,39 +1,36 @@ -name: Deploy +name: Deploy to GitHub Pages on: + push: + branches: + - main workflow_dispatch: - inputs: - environment: - description: 'Environment to deploy to' - required: true - default: 'production' - type: choice - options: - - production - - staging - version: - description: 'Version to deploy' - required: false - type: string + +permissions: + contents: write jobs: deploy: runs-on: ubuntu-latest - steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' - cache: 'yarn' + node-version: "20" + cache: yarn - name: Install dependencies - run: npx yarn install + run: yarn install --frozen-lockfile + + - name: Build + run: yarn build - - name: Build and Deploy - run: | - npx yarn build - GIT_USER=cupOJoseph npx yarn deploy \ No newline at end of file + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + cname: docs.nerite.org diff --git a/docusaurus.config.js b/docusaurus.config.js index 9abf559..2f4a601 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -15,7 +15,7 @@ const config = { favicon: "img/favicon.ico", // Set the production url of your site here - url: "https://neriteorg.github.io", + url: "https://docs.nerite.org", // Set the // pathname under which your site is served baseUrl: "/",