Skip to content
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.

Commit

Permalink
Publish website on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
nwmac committed Jul 24, 2020
1 parent a47e5dd commit e4785a6
Showing 1 changed file with 38 additions and 37 deletions.
75 changes: 38 additions & 37 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,40 +26,41 @@ jobs:
npm i
fi
npm run build
# publish-docs:
# 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: Add key to allow access to repository
# env:
# SSH_AUTH_SOCK: /tmp/ssh_agent.sock
# run: |
# mkdir -p ~/.ssh
# ssh-keyscan github.com >> ~/.ssh/known_hosts
# echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
# chmod 600 ~/.ssh/id_rsa
# cat <<EOT >> ~/.ssh/config
# Host github.com
# HostName github.com
# IdentityFile ~/.ssh/id_rsa
# EOT
# - name: Release to GitHub Pages
# env:
# USE_SSH: true
# GIT_USER: git
# run: |
# cd website
# git config --global user.email "actions@gihub.com"
# 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
# ./deploy.sh
publish-docs:
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: Add key to allow access to repository
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${{ secrets.GH_PAGES_DEPLOY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
cat <<EOT >> ~/.ssh/config
Host github.com
HostName github.com
IdentityFile ~/.ssh/id_rsa
EOT
- name: Release to GitHub Pages
env:
USE_SSH: true
GIT_USER: git
run: |
cd website
git config --global user.email "actions@gihub.com"
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
echo "Deploying web site... hang tight"
./deploy.sh

0 comments on commit e4785a6

Please sign in to comment.