fix(sponsors): fix QingCloud name and link #34
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 | |
on: | |
push: | |
branches: | |
- master # default branch | |
pull_request: | |
branches: | |
- master # default branch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 18 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" | |
- name: Cache NPM dependencies | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-npm-cache | |
restore-keys: | | |
${{ runner.OS }}-npm-cache | |
- name: Install Dependencies | |
run: npm install | |
- name: MakeCategory | |
run: | | |
cd ./public | |
./makeCategory | |
cd ../ | |
- name: Build | |
run: npm run build | |
- name: Setup SSH Private Key | |
env: | |
KEY: ${{ secrets.KEY }} | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$KEY" > ~/.ssh/id_rsa | |
chmod 600 ~/.ssh/id_rsa | |
ssh-keyscan 20.115.186.5 >> ~/.ssh/known_hosts | |
- name: Deploy | |
run: | | |
sudo apt install expect tcl -y | |
cd ./deploy | |
chmod +x deploy.sh unzipServer.sh upload.sh | |
./deploy.sh |