resources: sync with upstream #60
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 updated website | |
on: | |
push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout gbdev/gbadev.net | |
uses: actions/checkout@v2 | |
with: | |
repository: gbdev/gbadev.net | |
path: folder/repo | |
- name: Checkout gbdev/gbadev.net master | |
uses: actions/checkout@v2 | |
with: | |
repository: gbdev/gbadev.net | |
ref: master | |
path: folder/build | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '16' | |
- working-directory: folder/ | |
run: | | |
cd repo | |
npm install -g yarn | |
yarn install | |
yarn docs:build | |
mkdir dist | |
cp docs/.vuepress/dist/* dist/ -r | |
cp CNAME dist/ | |
cd .. | |
cp -a repo/dist/. build/ | |
cd build | |
mkdir -m 700 ~/.ssh | |
echo "${{ secrets.SSH_KEY_SECRET }}" > ~/.ssh/id_ed25519 | |
chmod 0600 ~/.ssh/id_ed25519 | |
git config --local user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m "Update build" && git push || : |