From aec43a0bd1de8ac974cd92b75d59b31a6ea870d7 Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Thu, 6 May 2021 09:37:05 +0200 Subject: [PATCH] Add Github Actions to build and publish --- .github/workflows/deployment.yml | 38 ++++++++++++++++++++++++++++++++ package.json | 1 - 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deployment.yml diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 00000000..addbf2b3 --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,38 @@ +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: | + npm ci + 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: Build docusaurus + run: | + npm ci + npm run build + - name: Deploy to Github Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build \ No newline at end of file diff --git a/package.json b/package.json index 91c3bfc7..2dd47183 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "start": "docusaurus start", "build": "docusaurus build", "swizzle": "docusaurus swizzle", - "deploy": "docusaurus deploy", "clear": "docusaurus clear", "serve": "docusaurus serve", "write-translations": "docusaurus write-translations",