initial guess is that it doesn’t look like <scp-ac...
# github-actions
d
initial guess is that it doesn’t look like scp-action supports directories
Copy code
target - target path on the server
source - scp file list
s
this is working ok, but what I do to seeting two target webpage is copied to /var/www/html and the app is copied to another destination example var/www
d
you can either comb through the action code to see if it supports that or you can just run the action twice, not the most efficient but it should work
s
ok when i solve it i'll let you know
the issue was solve
d
nice, are you able to share the solution?
s
yes, the code is here
name: Deploy on: [push] jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Copiar el contenido del repositorio con scp uses: appleboy/scp-action@master env: HOST: ${{ secrets.HOST }} USERNAME: ${{ secrets.USERNAME }} PORT: ${{ secrets.PORT }} KEY: ${{ secrets.SSHKEY }} with: source: "pagweb/*" target: "/var/www/html" -uses: actions/checkout@master - name: Copiar el contenido de folder app con scp uses: appleboy/scp-action@master env: HOST: ${{ secrets.HOST }} USERNAME: ${{ secrets.USERNAME }} PORT: ${{ secrets.PORT }} KEY: ${{ secrets.SSHKEY }} with: source: "app/*" target: "/home/ubuntu/app" strip_components: 1
d
gotta get used to using code blocks 😛
wrap ☝️ in three backticks `
👀 1
/snippet
is a good option too as that has type formatting
Copy code
on: [push]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Copiar el contenido del repositorio con scp
      uses: appleboy/scp-action@master
      env:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
      with:
        source: "pagweb/*"
        target: "/var/www/html"
        -uses: actions/checkout@master
    - name: Copiar el contenido de folder app con scp
      uses: appleboy/scp-action@master
      env:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
      with:
        source: "app/*"
        target: "/home/ubuntu/app"
        strip_components: 1
it’s just a little easier to read
Untitled.yaml
snippets are annoying IMO because I don’t like the collapse/expand but I can see how they’d be helpful with really long posts
✅ 1