Open hw9402 opened 1 year ago
+1
I had the same issue. Remove the slash at the begin for the source.
source: "app/build"
Hi, I solved this by combining the two jobs build and deploy to build_and_deploy, since a new job uses a new Ubuntu machine from GitHub that does not have the previously built files. So mine looks like this:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build web
- name: Deploy to web server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.WEB_SERVER_HOST }}
username: ${{ secrets.WEB_SERVER_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
source: "your_source_dir"
target: "/var/www/html/public-flutter"
debug: true
rm: true
what is the main reason behind this issue!!!! , I can't figure it out
- name: copying compose and env files
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
overwrite: true
source: "./compose.yaml"
target: "/home/ec2-user/uni-app/"
I just figured out what is the reason, I forgot to checkout the repo. before doing this step, so make sure that the file itself exists and you have access to it, that's one of the reasons behind this error
Hello! I need help about this error
when trying to upload react app build directory to my server with this workflow:
Also I verified that source directory(app/build/) exists by step Check current directory:
I have already searched for similar problems and solutions, but I can't solved it. How can I solve this problem?