From d76d5888e5e72247f7d3f5b9736ff6bedc3e49c8 Mon Sep 17 00:00:00 2001 From: Guusvanmeerveld Date: Tue, 22 Mar 2022 16:13:51 +0100 Subject: [PATCH] Added Github actions to deploy to pages --- .github/workflows/build.yml | 47 ------------------------------------ .github/workflows/deploy.yml | 31 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 47 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 1f0ad39..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: deploy - -on: - push: - branches: - - master - -jobs: - typescript: - runs-on: ubuntu-latest - steps: - - name: Setup checkout - uses: actions/checkout@v2 - - name: Setup NodeJS v12 - uses: actions/setup-node@v1 - with: - node-version: 12 - - name: Install Dependencies - run: yarn install - - name: Check for syntax errors - run: yarn test-build - - name: ESlint check - run: yarn lint - - ### Uncomment this if you want Docker hub integration - # docker: - # runs-on: ubuntu-latest - # needs: typescript - # steps: - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v1 - # - name: Set up Docker Buildx - # uses: docker/setup-buildx-action@v1 - # - name: Login to DockerHub - # uses: docker/login-action@v1 - # with: - # username: ${{ secrets.DOCKERHUB_USERNAME }} - # password: ${{ secrets.DOCKERHUB_TOKEN }} - # - name: Build Dockerfile and push - # id: docker_build - # uses: docker/build-push-action@v2 - # with: - # push: true - # # Replace this with your Docker hub tag and repository name. - # tags: user/repo:latest - # - name: Image digest - # run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..17696fd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,31 @@ +name: Deploy to Github Pages + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: "16.6.0" + + - name: Install npm dependencies + run: yarn install + + - name: Build website + run: yarn run export + env: + NODE_ENV: production + + - name: Deploy to pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./out