Skip to content

Merge pull request #41 from Dapp-Learning-DAO/feature/cici #1

Merge pull request #41 from Dapp-Learning-DAO/feature/cici

Merge pull request #41 from Dapp-Learning-DAO/feature/cici #1

Workflow file for this run

name: Official Backend CICD
on:
push:
# 分支
branches: [ main ]
pull_request_target:
branches: [ main ]
types: [closed]
jobs:
build:
if: |
github.event.pull_request.merged == true ||
github.event_name == 'push'
runs-on: ubuntu-latest
name: Building background
steps:
- run: |
echo Build is triggered
- uses: actions/checkout@v2 #拉取项目文件
- name: Set up JDK 8 #配置java环境
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Grant execute permission for gradlew #更改脚本权限
run: chmod +x gradlew
- name: Build with Gradle #开始打包 -x test 跳过测试
run: ./gradlew jar -x test
- name: Copy folder content recursively to remote
uses: garygrossgarten/github-action-scp@release
with:
- local: dist

Check failure on line 35 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / Official Backend CICD

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 35, Col: 9): A sequence was not expected
remote: "/root/Dapp-Learning-Official-web"
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }} # 服务器ssh端口(默认22)
- name: deploy_app #开始部署
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }} #服务器ip地址
username: ${{ secrets.USERNAME }} #服务器ssh用户名
password: ${{ secrets.PASSWORD }} #服务器ssh密码
port: ${{ secrets.PORT }} # 服务器ssh端口(默认22)
script: |
cd /root/Dapp-Learning-Official-web/dist
export DBPWD=${{secrets.SPRING_DATASOURCE_PASSWORD}}
sed 's/${SPRING_DATASOURCE_PASSWORD}/$DBPWD/g' conf/application.yml >> conf/application.yml
bash stop.sh
bash start.sh