Skip to content

Commit

Permalink
feat(完成 ci/cd配置): 完成 CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
白唯 committed Oct 14, 2020
1 parent 6c82568 commit 262d1b2
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 25 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/de.yml
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
25 changes: 0 additions & 25 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 262d1b2

Please sign in to comment.