Link username profiles. #63
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: Update site | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
jobs: | |
build: | |
name: Build and Push | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.7.0 | |
- name: Install Docusaurus | |
run: npm install --global docusaurus-init | |
- run: npm install --global docusaurus | |
- run: npm init docusaurus | |
- run: npm install | |
- name: Generate site | |
run: npm run build | |
- name: Upload resulting website | |
uses: actions/upload-artifact@v1 | |
with: | |
name: build | |
path: build/ | |
- uses: actions/checkout@v2 | |
with: | |
ref: gh-pages | |
- run: rm -rf * | |
- name: Download website | |
uses: actions/download-artifact@v1 | |
with: | |
name: build | |
- name: Replace docs | |
run: | | |
mv /home/runner/work/new.blishhud.com/new.blishhud.com/build/* /home/runner/work/new.blishhud.com/new.blishhud.com/ | |
git add -A | |
if [[ `git status --porcelain` ]]; then | |
git config --local user.email "actions@github.com" | |
git config --local user.name "github-actions" | |
git commit -m "Update website for ${GITHUB_REF##*/} (${GITHUB_SHA:0:7})" | |
fi | |
- name: Push docs | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages |