-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
白唯
committed
Oct 14, 2020
1 parent
6c82568
commit 262d1b2
Showing
2 changed files
with
43 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: GitHub Actions Build and Deploy Project | ||
on: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Build and Deploy | ||
uses: JamesIves/github-pages-deploy-action@master | ||
env: | ||
ACCESS_TOKEN: ${{ secrets.MY_DEPLOY_KEY }} | ||
BRANCH: gh-pages | ||
FOLDER: dist | ||
BUILD_SCRIPT: yarn && build && cp ./dist/index.html ./dist/404.html && echo "pro.abckey.com" > ./dist/CNAME | ||
- name: deploy to target directory | ||
uses: crazy-max/ghaction-github-pages@v1 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: dist | ||
repo: ibwei/vue3-base | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.MY_DEPLOY_KEY }} | ||
GITHUB_PAT: ${{secrets.MY_DEPLOY_KEY}} | ||
- name: Deploy | ||
uses: appleboy/ssh-action@master # 使用ssh链接服务器 | ||
with: | ||
host: ${{ secrets.HOST }} | ||
username: ${{ secrets.USERNAME }} | ||
password: ${{ secrets.PASSWORD }} | ||
port: ${{ secrets.PORT }} | ||
script: | | ||
rm -rf /data/www/temp | ||
mkdir /data/www/temp | ||
cd /data/www/temp | ||
git clone https://github.com/ibwei/vue3-base/ | ||
cd /data/www/temp/vue3-base | ||
git checkout gh-pages | ||
mv dist/* /data/www/vue3 |
This file was deleted.
Oops, something went wrong.