version: 2.1

jobs:
  deploy-website:
    docker:
      - image: circleci/node:10.16

    steps:
      - checkout
      - run:
          name: Deploying to GitHub Pages
          command: |
            git config --global user.email "mkolar@users.noreply.github.com"
            git config --global user.name "Website Deployment Script"
            echo "machine github.com login mkolar password $GITHUB_TOKEN" > ~/.netrc
            cd website && yarn install && GIT_USER=mkolar yarn run deploy

workflows:
  build_and_deploy:
    jobs:
