deploy: v3.0.3 #135
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: deployment | |
on: | |
push: | |
branches: | |
- main | |
- master | |
env: | |
deploy_key: ${{ secrets.TEST_KEY }} | |
jobs: | |
# tests: | |
# if: startsWith(github.event.head_commit.message, 'deploy:') | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v1 | |
# - uses: actions/setup-node@v1 | |
# with: | |
# node-version: '20.x' | |
# - name: Test Build | |
# run: | | |
# yarn install | |
# yarn build | |
deployment: | |
# if: startsWith(github.event.head_commit.message, 'deploy:') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "16.x" | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.GH_PAGES_DEPLOY }} | |
- name: docusaurus deploy | |
env: | |
USE_SSH: true | |
GIT_USER: material-table-core-worker | |
run: | | |
yarn install | |
yarn build | |
cd build | |
git config --global user.email "[email protected]" | |
git config --global user.name "material-table-core-worker" | |
echo "set git config" | |
git init -b main | |
echo "init git" | |
echo "deploy_key: $GIT_USER" | |
git remote add upstream https://[email protected]/material-table-core/material-table-core.github.io | |
echo "add upstream" | |
git add . | |
git commit -m "deploy: ${{ github.event.head_commit.message }}" | |
echo "commit" | |
git push upstream main --force |