diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 0000000..39af625 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,54 @@ +# https://docusaurus.io/docs/deployment#deploying-to-github-pages +name: documentation + +on: + pull_request: + branches: [main] + push: + branches: [main] + +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' + - uses: webfactory/ssh-agent@v0.5.0 + with: + ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} + - name: Release to GitHub Pages + env: + USE_SSH: true + GIT_USER: git + run: | + git config --global user.email "publisher@foomo.org" + git config --global user.name "gh-actions" + 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/foomo/docusaurus.config.js b/foomo/docusaurus.config.js index 4ffda2f..8a7be35 100644 --- a/foomo/docusaurus.config.js +++ b/foomo/docusaurus.config.js @@ -6,16 +6,17 @@ /** @type {import('@docusaurus/types').Config} */ const config = { - title: 'foomo project docs', - tagline: 'stuff we wrote, because nobody else wanted to', - url: 'https://foomo.org', - baseUrl: '/', + title: 'Foomo Project Docs', + tagline: 'Stuff we wrote, because nobody else wanted to', + url: "https://foomo.github.io/", + baseUrl: '/foomo-docs/', onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', favicon: 'img/favicon.ico', - organizationName: 'bestbytes', // Usually your GitHub org/user name. - projectName: 'foomo', // Usually your repo name. - + organizationName: 'foomo', // Usually your GitHub org/user name. + projectName: 'foomo-docs', // Usually your repo name. + deploymentBranch: 'gh-pages', + trailingSlash: false, presets: [ [