set ssh push #11
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: Build | |
on: push | |
jobs: | |
build: | |
env: | |
HOST: ${{ secrets.HOST }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Install Nodejs | |
uses: actions/[email protected] | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Build | |
run: yarn && yarn build | |
- name: Generate SSH Key File | |
run: | | |
mkdir .ssh | |
chmod 700 .ssh | |
ls -al | |
echo "${{ secrets.RSA }}" > .ssh/id_rsa | |
- name: Upload Files | |
run: | | |
scp -i .ssh/id_rsa -r dist/* liubin@$HOST:/home/web/www |