Giter VIP home page Giter VIP logo

web-deploy's Introduction

web deploy - Continuous integration for everyone

Automate deploying websites and more with this GitHub action. It's free!

tests


Usage Example

Place the following in Your_Project/.github/workflows/main.yml

on: push
name: Publish Website
jobs:
  web-deploy:
    name: ๐Ÿš€ Deploy Website Every Commit
    runs-on: ubuntu-latest
    steps:
    - name: ๐Ÿšš Get Latest Code
      uses: actions/checkout@v3
    
    - name: ๐Ÿ“‚ Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: example.com
        remote-user: username
        private-ssh-key: ${{ secrets.SSH_KEY }}
        destination-path: ~/destinationFolder/

Requirements

  • You must have shell access to your server, please read you webite hosts documentation
  • You CANNOT use a FTP account - they are not the same!
  • You will need to create a SSH user to deploy. Normally this is your cpanel or hosting providers username and password
  • Most web hosts change the default port (22), check with your host for your port number

Setup Steps

  1. Select the repository you want to add the action to
  2. Select the Actions tab
  3. Select Blank workflow file or Set up a workflow yourself, if you don't see these options manually create a yaml file Your_Project/.github/workflows/main.yml
  4. Paste the example above into your yaml file and save
  5. Now you need to add a key to the secrets section in your project. To add a secret go to the Settings tab in your project then select Secrets. Add a new Secret for private-ssh-key
  6. Update your yaml file settings

Settings

Keys can be added directly to your .yml config file or referenced from your project Secrets storage.

To add a secret go to the Settings tab in your project then select Secrets. I strongly recommend you store your private-ssh-key as a secret.

Key Name Required? Example Default Description
target-server Yes example.com Destination server to deploy to
destination-path Yes ~/folderOnServerThatAlreadyExists/ Path on the server to deploy to. Must already exist.
remote-user Yes username SSH user to login as
private-ssh-key Yes -----BEGIN RSA PRIVATE KEY----- ...... SSH Private key. Must be specified as a secret.
source-path No ./myFolderToPublish/ ./ Path to upload to on the server, must end with trailing slash /
ssh-port No 12345 22 SSH port to use. Most hosts change this from the default. This is NOT your websites port.
rsync-options No See rsync-options section below --archive --verbose --compress --human-readable --progress --delete-after --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore Note: If customizing you should re-specify defaults (assuming you want them). Custom rsync arguments, this field is passed through directly into the rsync script.

Advanced options using rsync-options

Custom arguments, this field is passed through directly into the rsync script. See rsync's manual for all options. You can use as many arguments as you want, seperate them with a space

Below is an incomplete list of commonly used args:

Option Description
--archive A quick way of saying you want recursion and want to preserve almost everything
--dry-run Does not upload or delete anything, but tells you what it would upload/delete if this was a real deploy
--stats Print verbose statistics on the file transfer, allowing you to tell how effective rsyncโ€™s delta-transfer algorithm is for your data
--links When symlinks are encountered, recreate the symlink on the destination
--compress Compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted
--human-readable Output bytes in a more human-readable format (K, M, G)
--itemize-changes itemized list of the changes that are being made to each file, including attribute changes
--delete-after When you delete a file on github it will also be deleted on the server. Files are deleted at the end of a deployment to minimize downtime.
--max-size '200K' Ignore syncing files over this limit. Value is a number followed by "K", "M", or "G"
--exclude 'file.txt' Excludes file(s) from the deployment. Supports glob pattterns (ex: *.jpg). You can have multiple excludes!
--include 'file.txt' Includes file(s) even if it was excluded. Supports glob pattterns (ex: *.jpg). You can have multiple includes!

See rsync's manual for all options

Common Examples

Build and Publish React/Angular/Vue Website

Make sure you have an npm script named 'build'. This config should work for most node built websites.

on: push
name: Publish Website
jobs:
  web-deploy:
    name: ๐Ÿš€ Deploy Website Every Commit
    runs-on: ubuntu-latest
    steps:
    - name: ๐Ÿšš Get Latest Code
      uses: actions/checkout@v3

    - name: ๐Ÿ“ฆ Install Packages
    - uses: actions/setup-node@v3
      with:
        node-version: 18
        cache: "npm"
    - run: npm ci
      
    - name: ๐Ÿ”จ Build
      run: npm run build
    
    - name: ๐Ÿ“‚ Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: example.com
        remote-user: username
        private-ssh-key: ${{ secrets.SSH_KEY }}
        destination-path: ~/destinationFolder/

Log only dry run: Use this mode for testing

Ouputs a list of files that will be created/modified to sync your source without making any actual changes

on: push
name: Publish Website Dry Run
jobs:
  web-deploy:
    name: ๐Ÿš€ Deploy Website Every Commit
    runs-on: ubuntu-latest
    steps:
    - name: ๐Ÿšš Get Latest Code
      uses: actions/checkout@v3

    - name: ๐Ÿ“‚ Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: example.com
        remote-user: username
        private-ssh-key: ${{ secrets.SSH_KEY }}
        ssh-port: 22
        destination-path: ~/destinationFolder/
        rsync-options: --dry-run --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore

Want another example? Let me know by creating a github issue


Badge

If you appreciate this github action give it a โญ or show off with one of the badges below. Feel free to edit the text or color.

Deployed with web deploy

[<img alt="Deployed with web deploy" src="https://img.shields.io/badge/Deployed With-web deploy-%3CCOLOR%3E?style=for-the-badge&color=0077b6">](https://github.com/SamKirkland/web-deploy)

Deployed with web deploy

[<img alt="Deployed with web deploy" src="https://img.shields.io/badge/Deployed With-web deploy-%3CCOLOR%3E?style=for-the-badge&color=2b9348">](https://github.com/SamKirkland/web-deploy)

Deployed with web deploy

[<img alt="Deployed with web deploy" src="https://img.shields.io/badge/Deployed With-web deploy-%3CCOLOR%3E?style=for-the-badge&color=d00000">](https://github.com/SamKirkland/web-deploy)

Website Deployed for Free with web deploy

[<img alt="Website Deployed for Free with web deploy" src="https://img.shields.io/badge/Website deployed for free with-web deploy-%3CCOLOR%3E?style=for-the-badge&color=297FA9">](https://github.com/SamKirkland/web-deploy)

Website Deployed for Free with web deploy

[<img alt="Website Deployed for Free with web deploy" src="https://img.shields.io/badge/Website deployed for free with-web deploy-%3CCOLOR%3E?style=for-the-badge&color=2b9348">](https://github.com/SamKirkland/web-deploy)

Website Deployed for Free with web deploy

[<img alt="Website Deployed for Free with web deploy" src="https://img.shields.io/badge/Website deployed for free with-web deploy-%3CCOLOR%3E?style=for-the-badge&color=d00000">](https://github.com/SamKirkland/web-deploy)

FAQ

How to exclude .git files from the publish

Git files are excluded by default

If have customized rsync-options you will need to re-add the default exclude options using --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore

How to exclude a specific file or folder

You can use rsync-options and pass in as many --exclude options as you want. By default this action excludes github files. If you choose to customize rsync-options make sure you copy over the defaults.

Example excluding all .jpg files:

rsync-options: --exclude "*.jpg"

Example excluding a specific folder:

rsync-options: --exclude "wp-content/themes/"


Common Errors

rsync not found. Please see https://github.com/SamKirkland/web-deploy#rsync-not-installed

This library uses rsync to sync files. The script was not able to detect rsync on the machine running the action. If you are using runs-on: ubuntu-latest you will always have rsync.

If you are using windows-latest, windows-XXXX, macos-latest, macos-12 or a self-hosted runner you will need to install rsync before the web-deploy step.

This is pretty easy to do!

On windows runners run your windows specific steps, then use a ubuntu-latest step to deploy.

On self-hosted runners install rsync before the web-deploy step.

  runs-on: [self-hosted, linux, my-self-hosted-runner-label]
  steps:
    - name: Install rsync
      run: |
        sudo apt-get update
        sudo apt-get install rsync

On macos runners install rsync before the web-deploy step.

  runs-on: macos-latest
  steps:
    - name: Install rsync
      run: |
        brew update
        brew install rsync

Read more about customizing runners

https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners


web-deploy's People

Contributors

confidantcommunications avatar samkirkland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

web-deploy's Issues

Extra Comment "--exclude-from"

Can you perhaps add in the option to specify "--exclude-from" within the rsync and all excludes will be stored in a separate file?

rsync-option --ignore not working

rsync-options: --include not working.

I try to exclude all files by --exclude=* except wp-content/themes folder and files in it by:

--exclude=/* --include=/wp-content/ --include=/wp-content/themes/**

Permission denied (publickey,password)

Bug Description
I have tried several different attempts at generating SSH keys (both via github and from cpanel), both fail to connect via web-deploy action. When I try it from my local PC to connect, it's totally fine and authenticates. I have also added the public SSH key to github.

My Action Config

on:
  push:
    branches:
      - dev
name: Publish Dev Branch to CPanel
jobs:
  web-deploy:
    name: ๐Ÿš€ Deploy Website to Dev
    runs-on: ubuntu-latest
    steps:
    - name: ๐Ÿšš Get Latest Code
      uses: actions/checkout@v3

    - name: ๐Ÿ“ฆ Install Packages
      uses: actions/setup-node@v3
      with:
        node-version: 16
        cache: "npm"
    - run: npm ci
      
    - name: ๐Ÿ”จ Build
      run: npm run build
    
    - name: ๐Ÿ“‚ Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: ############
        remote-user:  ######
        private-ssh-key: ${{ secrets.SSH_KEY }}
        destination-path: ~/home/###/###/repositories/####/
        ssh-port: 722

My Action Log

   Run SamKirkland/web-deploy@v1
----------------------------------------------------------------
๐Ÿš€ Thanks for using web deploy. Let's deploy some stuff!
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a โญ on Github --> https://github.com/SamKirkland/web-deploy
or add a badge ๐Ÿท๏ธ to your projects readme --> https://github.com/SamKirkland/web-deploy#badge
----------------------------------------------------------------
HOME /home/runner
GITHUB_WORKSPACE /home/runner/work/###/
[SSH] Creating /home/runner/.ssh/known_hosts file in  /home/runner/work/kitt-front/kitt-front
โœ… [SSH] file created.
โœ… Ssh key added to `.ssh` dir  /home/runner/.ssh/web_deploy_key
/usr/bin/rsync -e ssh -p 722 -i /home/runner/.ssh/web_deploy_key -o StrictHostKeyChecking=no --archive --verbose --compress --human-readable --progress --delete-after --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore ./ #####@#####:~/home/#####/#####/####/#####/
<Buffer 57 61 72 6e 6[9](https://github.com/####/#####/actions/runs/4136808053/jobs/7151168830#step:6:10) 6e 67 3a 20 50 65 72 6d 61 6e 65 6e 74 6c 79 20 61 64 64 65 64 20 27 5b 66 65 72 67 75 73 2d 6c 6f 6e 32 2e 6b 72 79 73 74 61 6c 2e 75 ... 47 more bytes>
Warning: Permanently added '[####]:722' (ED25519) to the list of known hosts.
<Buffer 4c 6f 61 64 20 6b 65 79 20 22 2f 68 6f 6d 65 2f 72 75 6e 6e 65 72 2f 2e 73 73 68 2f 77 65 62 5f 64 65 70 6c 6f 79 5f 6b 65 79 22 3a 20 65 72 72 6f 72 ... [15](https://github.com/###/##/actions/runs/4136808053/jobs/7151168830#step:6:16) more bytes>
Load key "/home/runner/.ssh/web_deploy_key": error in libcrypto
<Buffer 50 65 72 6d 69 73 73 69 6f 6e [20](https://github.com/#####/####/actions/runs/4136808053/jobs/7151168830#step:6:21) 64 65 6e 69 65 64 2c 20 70 6c 65 61 73 65 20 74 72 79 20 61 67 61 69 6e 2e 0d 0a>
Permission denied, please try again.
<Buffer 50 65 72 6d 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 2c 20 70 6c 65 61 73 65 20 74 72 79 20 61 67 61 69 6e 2e 0d 0a>
Permission denied, please try again.
<Buffer 6b 69 74 74 6d 65 64 69 40 66 65 72 67 75 73 2d 6c 6f 6e 32 2e 6b 72 79 73 74 61 6c 2e 75 6b 3a 20 50 65 72 6d 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 ... 24 more bytes>
<Buffer 72 73 79 6e 63 3a 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 75 6e 65 78 70 65 63 74 65 64 6c 79 20 63 6c 6f 73 65 64 20 28 30 20 62 79 74 65 73 20 72 65 63 ... 93 more bytes>
#####@fergus-lon2.krystal.uk: Permission denied (publickey,password).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c([22](https://github.com/####/####/actions/runs/4136808053/jobs/7151168830#step:6:23)8) [sender=3.2.3]
Error: Error: The process '/usr/bin/rsync' failed with exit code [25](https://github.com/####/###/actions/runs/4136808053/jobs/7151168830#step:6:26)5
โœ… Deploy Complete

Permissions for web_deploy_key are too open

Bug Description
I have stored the ss_key as a secret. When its copied to the file, I get the following error:

Permissions for 'D:\a\_actions\SamKirkland\web-deploy\v1\dist\.ssh\web_deploy_key' are too open.

My Action Config

  deploy:
    runs-on: windows-latest
    needs: build
    steps:
    - name: Install Rsync
      run: choco install rsync
    - name: Rsync version 
      run: gh version
    - name: webDeploy
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: *******
        remote-user: **********
        private-ssh-key: ${{ secrets.SSH_KEY }}
        destination-path: ~/GitActionTest/

My Action Log

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<Buffer 40 20 20 20 20 20 20 20 20 20 57 41 52 4e 49 4e 47 3a 20 55 4e 50 52 4f 54 45 43 54 45 44 20 50 52 49 56 41 54 45 20 4b 45 59 20 46 49 4c 45 21 20 20 ... 72 more bytes>
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
<Buffer 50 65 72 6d 69 73 73 69 6f 6e 73 20 66 6f 72 20 27 44 3a 5c 5c 61 5c 5c 5f 61 63 74 69 6f 6e 73 5c 5c 53 61 6d 4b 69 72 6b 6c 61 6e 64 5c 5c 77 65 62 ... 56 more bytes>
Permissions for 'D:\\a\\_actions\\SamKirkland\\web-deploy\\v1\\dist\\.ssh\\web_deploy_key' are too open.
<Buffer 49 74 20 69 73 20 72 65 71 75 69 72 65 64 20 74 68 61 74 20 79 6f 75 72 20 70 72 69 76 61 74 65 20 6b 65 79 20 66 69 6c 65 73 20 61 72 65 20 4e 4f 54 ... 24 more bytes>
It is required that your private key files are NOT accessible by others.
<Buffer 54 68 69 73 20 70 72 69 76 61 74 65 20 6b 65 79 20 77 69 6c 6c 20 62 65 20 69 67 6e 6f 72 65 64 2e 0d 0a>
This private key will be ignored.
<Buffer 4c 6f 61 64 20 6b 65 79 20 22 44 3a 5c 5c 61 5c 5c 5f 61 63 74 69 6f 6e 73 5c 5c 53 61 6d 4b 69 72 6b 6c 61 6e 64 5c 5c 77 65 62 2d 64 65 70 6c 6f 79 ... 52 more bytes>
Load key "D:\\a\\_actions\\SamKirkland\\web-deploy\\v1\\dist\\.ssh\\web_deploy_key": bad permissions
************************: Permission denied (publickey,keyboard-interactive).
<Buffer 72 73 79 6e 63 3a 20 5b 73 65 6e 64 65 72 5d 20 73 61 66 65 5f 72 65 61 64 20 66 61 69 6c 65 64 20 74 6f 20 72 65 61 64 20 [34](***************/job/18949547901#step:4:35) 20 62 79 74 65 73 3a 20 ... 31 more bytes>
rsync: [sender] safe_read failed to read 4 bytes: Connection reset by peer (104)
<Buffer 72 73 79 6e 63 20 65 72 72 6f 72 3a 20 65 72 72 6f 72 20 69 6e 20 72 73 79 6e 63 20 70 72 6f 74 6f 63 6f 6c 20 64 61 74 61 20 73 74 72 65 61 6d 20 28 ... [37](https://github.com/****************/actions/runs/6963609545/job/18949547901#step:4:38) more bytes>
rsync error: error in rsync protocol data stream (code 12) at io.c(282) [sender=3.2.7]
Error: Error: The process 'C:\ProgramData\Chocolatey\bin\rsync.exe' failed with exit code 12

Missing required input "source-path"

Bug Description
When I open my workflow file than there is linting error, displaying, that there is a missing required input, although the source-path shouldn't be required

My Action Config

on:
  # Triggers the workflow on push or pull request events but only for the "main" branch
  #   push:
  #     branches: ["main"]
  #   pull_request:
  #     branches: ["main"]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:
jobs:
  web-deploy:
    name: ๐ŸŽ‰ SSH-Deploy
    runs-on: ubuntu-latest
    steps:
      - name: ๐Ÿšš Get latest code
        uses: actions/checkout@v3

      - name: ๐Ÿ’ป Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 18

      - name: ๐Ÿ“ฅ Install dependencies
        run: npm ci

      - name: ๐Ÿ”จ Build Project
        run: npm run production

      - name: ๐Ÿ“‚ Sync files
        # https://github.com/SamKirkland/web-deploy
        uses: SamKirkland/web-deploy@v1
        with:
          target-server: ${{ secrets.SSH_SERVER }}
          remote-user: ${{ secrets.SSH_USERNAME }}
          private-ssh-key: ${{ secrets.SSH_KEY }}
          ssh-port: 22
          destination-path: ./www/public_html/
          rsync-options: >
            --dry-run
            --archive
            --verbose
            --compress
            --delete-after
            --human-readable
            --exclude-from=.github/workflows/deploy/rsync-exclude.txt

Here is a screenshot:
image

Add password field

Hello!
If there any way to add the password field to the component, because my ISP provider provides only ssh ftp access with a username and password?
Thank you.

Please create option to prevent the Known hosts list warning

Bug Description
Not really a bug but i want to be able to supress the :

Warning: Permanently added 'xx.xxx.xxx.xx' (ED25519) to the list of known hosts. from the output in the actions

dont have branch rights so this can be the solution:

actions.yml:

inputs:
suppress-ssh-warning:
description: "Set to true to suppress SSH known hosts warning"
required: false
default: 'false'

main:

suppress_ssh_warning: getInput("suppress-ssh-warning") === 'true'

and

(create if statement)

let sshOptions = -e 'ssh -p ${args.ssh_port} -i ${privateKeyPath} -o StrictHostKeyChecking=no';
if (args.suppress_ssh_warning) {
sshOptions = -e 'ssh -p ${args.ssh_port} -i ${privateKeyPath} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR';
}

configuration example

My Action Config

on:
  push:
  - name: ๐Ÿ“‚ Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: ${{ secrets.server}}
        remote-user: ${{ secrets.user}}
        private-ssh-key: ${{ secrets.SSH_KEY }}
        ssh-port: ${{ secrets.port}}
        destination-path: ~/core/
        rsync-options: --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore --exclude=public/uploads/*

It works when uploading to the server but rsync removes the folders vendor and .env how can these 2 things not be deleted on the server?

Web-deploy keeps deleting manually created files and folders

Bug Description
Whenever I run the web-deploy action in my server, all files and folders that does not exist in the git repo are automatically deleted from the server.

For example, I have a file .env and this file is not included in the github repo, but whenever I run the deploy script, it is automatically deleted from the server. Same goes for folders which are created manually in the server.

My Action Config

on:
    push:
        branches:
            - production
name: ๐Ÿš€ Deploy files to the production server on push to production branch
jobs:
    deploy:
        name: ๐ŸŽ‰ Deploy files
        runs-on: ubuntu-latest
        steps:
            - name: ๐Ÿšš Get latest code
              uses: actions/checkout@v4

            - name: Setup PHP ๐Ÿ˜
              uses: shivammathur/setup-php@v2
              with:
                php-version: 8.2

            - name: Cache Composer Packages ๐Ÿ“ฆ
              id: composer-cache
              uses: actions/cache@v3
              with:
                path: vendor
                key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
                restore-keys: |
                    ${{ runner.os }}-php-

            - name: Install Dependencies ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ
              run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader

            - name: ๐Ÿ“‚ Sync files
              uses: SamKirkland/web-deploy@v1
              with:
                target-server: example.com
                remote-user: ${{ secrets.do_sftp_username }}
                private-ssh-key: ${{ secrets.do_application_ssh_key }}
                destination-path: ~/public_html/
                source-path: ./
                ssh-port: 22
                rsync-options: --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore --exclude "misc/" --exclude "src/" --exclude "*.txt"

What could be the problem?

web-deploy not working: Unable to resolve action `SamKirkland/[email protected]`, unable to find version `1.0.0`

The output of update main.yml:

Current runner version: '2.275.1'
Operating System
Ubuntu
18.04.5
LTS
Virtual Environment
Environment: ubuntu-18.04
Version: 20201210.0
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20201210.0/images/linux/Ubuntu1804-README.md
Prepare workflow directory
Prepare all required actions
Getting action download info
Failed to resolve action download info. Error: Unable to resolve action SamKirkland/[email protected], unable to find version 1.0.0
Retrying in 24.817 seconds
Failed to resolve action download info. Error: Unable to resolve action SamKirkland/[email protected], unable to find version 1.0.0
Retrying in 12.956 seconds
Error: Failed to resolve action download info.

Content of my main.yaml:

on: push
name: Publish Website
jobs:
web-deploy:
name: ๐Ÿš€ Deploy website every commit
runs-on: ubuntu-latest
steps:
- name: ๐Ÿšš Get latest code
uses: actions/[email protected]

- name: ๐Ÿ“‚ Sync files
  uses: SamKirkland/[email protected]
  with:
    target-server: sftp.beautique-in.nl
    remote-user: 346741
    remote-key: ${{ secrets.ftp_password }}
    rsync-options: --dry-run --insecure

OPenSSL3 - ssh-rsa

Hi,

I'm using OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
This version doesn't allow the usage of rsa keys (auth.log : userauth_pubkey: key type ssh-rsa not in PubkeyAcceptedAlgorithms [preauth])
I can't provide an ED25519 key because it is clearly written in the specs it has to be a RSA key.
I tried allowing rsa temporarily to see if it works, unfortunately it didn't. Either way I wouldn't like to use something not secure enough. It would be better if there was a way to use ED25519 keys.
Is that possible somehow?

Thanks

Load key "/home/runner/.ssh/web_deploy_key": invalid format

Bug Description
A clear and concise description of what the bug is.

My Action Config

on: push
name: Publish Website Dry Run
jobs:
  web-deploy:
    name: ๐Ÿš€ Deploy Website Every Commit
    runs-on: ubuntu-latest
    if: ${{ contains(github.event.head_commit.message, '#prod') }}
    steps:
      - name: ๐Ÿšš Get Latest Code
        uses: actions/checkout@v3

      - name: ๐Ÿ“‚ Sync Files
        uses: SamKirkland/web-deploy@v1
        with:
          target-server: #######pl
          remote-user: ##########
          private-ssh-key: ${{ secrets.SSH_DEV }}
          ssh-port: 22
          destination-path: ~/public_html/schody/
          rsync-options: --dry-run --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore

My Action Log

   Run SamKirkland/web-deploy@v1
----------------------------------------------------------------
๐Ÿš€ Thanks for using web deploy. Let's deploy some stuff!
----------------------------------------------------------------
If you found this project helpful, please support it
by giving it a โญ on Github --> https://github.com/SamKirkland/web-deploy
or add a badge ๐Ÿท๏ธ to your projects readme --> https://github.com/SamKirkland/web-deploy#badge
----------------------------------------------------------------
HOME /home/runner
GITHUB_WORKSPACE /home/runner/work/schody/schody
[SSH] Creating /home/runner/.ssh/known_hosts file in  /home/runner/work/schody/schody
โœ… [SSH] file created.
โœ… Ssh key added to `.ssh` dir  /home/runner/.ssh/web_deploy_key
/usr/bin/rsync -e ssh -p 22 -i /home/runner/.ssh/web_deploy_key -o StrictHostKeyChecking=no --dry-run --archive --verbose --compress --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore ./ [email protected]:~/public_html/schody/
<Buffer 57 61 72 6e 69 6e 67 3a 20 50 65 72 6d 61 6e 65 6e 74 6c 79 20 61 64 64 65 64 20 27 61 6c 6c 73 65 6e 73 65 73 2e 70 6c 2c 39 34 2e 31 35 32 2e 31 38 ... 44 more bytes>
Warning: Permanently added 'allsenses.pl,94.152.181.235' (ECDSA) to the list of known hosts.
<Buffer 4c 6f 61 64 20 6b 65 79 20 22 2f 68 6f 6d 65 2f 72 75 6e 6e 65 72 2f 2e 73 73 68 2f 77 65 62 5f 64 65 70 6c 6f 79 5f 6b 65 79 22 3a 20 69 6e 76 61 6c ... [11](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:12) more bytes>
Load key "/home/runner/.ssh/web_deploy_key": invalid format
<Buffer 61 6c 6c 73 65 6e 73 65 73 64 65 76 40 61 6c 6c 73 65 6e 73 65 73 2e 70 6c 3a [20](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:21) 50 65 72 6d 69 73 73 69 6f 6e 20 64 65 6e 69 65 64 20 28 70 75 62 6c ... 30 more bytes>
[email protected]: Permission denied (publickey,keyboard-interactive).
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
<Buffer 72 73 79 6e 63 3a 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 75 6e 65 78 70 65 63 74 65 64 6c 79 20 63 6c 6f 73 65 64 20 28 30 20 62 79 74 65 73 20 72 65 63 ... 93 more bytes>
rsync error: unexplained error (code 255) at io.c([23](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:24)5) [sender=3.1.3]
Error: Error: The process '/usr/bin/rsync' failed with exit code [25](https://github.com/allsensesdev/schody/actions/runs/3330115080/jobs/5508178259#step:3:26)5
โœ… Deploy Complete

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.