Adds the ability to paste images into the website (#27) #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Npm Install | |
run: npm install | |
- name: Run Build | |
run: npm run build | |
build-and-deploy: | |
needs: build-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Build | |
run: npm install && npm run build | |
- name: Push | |
run: | | |
mkdir -p "$HOME/.ssh" | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > "$HOME/.ssh/id_rsa" | |
touch "$HOME/.ssh/known_hosts" | |
chmod 700 "$HOME/.ssh" | |
chmod 600 "$HOME/.ssh/id_rsa" | |
chmod 600 "$HOME/.ssh/known_hosts" | |
ssh-keyscan -t rsa github.com >> "$HOME/.ssh/known_hosts" | |
eval $(ssh-agent -s) | |
ssh-add "$HOME/.ssh/id_rsa" | |
git config --global user.email "[email protected]" | |
git config --global user.name "ActionsBot" | |
cd dist | |
git init | |
git add . | |
git commit -m "Deploying ${GITHUB_SHA}" | |
git remote add origin [email protected]:${GITHUB_REPOSITORY}.git | |
git remote -v | |
git push origin HEAD:gh-pages --force |