-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
76f45da
commit c19bf23
Showing
1 changed file
with
26 additions
and
14 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 |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
# Environment variables available to all jobs and steps in this workflow | ||
|
||
permissions: | ||
contents: read | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
|
@@ -33,21 +33,33 @@ jobs: | |
run: npm run build | ||
|
||
|
||
# - name: Deploy to GitHub Pages | ||
# uses: JamesIves/github-pages-deploy-action@v4 | ||
# if: ${{ github.ref == 'refs/heads/main' }} | ||
# with: | ||
# branch: gh-pages//这个是存储你项目打包后的文件分支 | ||
# folder: dist | ||
# # token: ${{ secrets.TOKEN }} | ||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
# if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
branch: gh-pages # 这个是存储你项目打包后的文件分支 | ||
folder: dist | ||
# token: ${{ secrets.TOKEN }} | ||
|
||
|
||
- name: copy dist file with scp | ||
uses: appleboy/scp-action@v0.0.1 | ||
- name: Deploy to server | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.REMOTE_HOST }} | ||
username: ${{ secrets.REMOTE_USER }} | ||
password: ${{ secrets.REMOTE_PASS }} | ||
port: 22 | ||
source: 'dist/' | ||
target: '/www/wwwroot/8.152.0.253/something0408/' | ||
port: ${{ secrets.REMOTE_PORT }} | ||
script: | | ||
cd /www/wwwroot/8.152.0.253/something0408 # 替换为您的项目在服务器上的位置 | ||
git pull origin gh-pages # 拉取最新代码 | ||
# - name: copy dist file with scp | ||
# uses: appleboy/[email protected] | ||
# with: | ||
# host: ${{ secrets.REMOTE_HOST }} | ||
# username: ${{ secrets.REMOTE_USER }} | ||
# password: ${{ secrets.REMOTE_PASS }} | ||
# port: 22 | ||
# source: 'dist/' | ||
# target: '/www/wwwroot/8.152.0.253/something0408/' |