fix: added known hosts to action
Some checks failed
Gitea Actions Demo / Build (push) Failing after 12s
Some checks failed
Gitea Actions Demo / Build (push) Failing after 12s
This commit is contained in:
@@ -11,18 +11,27 @@ jobs:
|
|||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
- uses: actions/setup-node@v5
|
- name: Setup Node v20
|
||||||
|
uses: actions/setup-node@v5
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
|
- name: setup ssh
|
||||||
|
run:
|
||||||
|
mkdir -p ~/.ssh/
|
||||||
|
echo "$SSH_PRIVATE_KEY" > ../private.key
|
||||||
|
sudo chmod 600 ../private.key
|
||||||
|
echo "$SSH_KNOWN_HOSTS" > ~/.ssh/known_hosts
|
||||||
|
echo "HELOO" > ../test
|
||||||
|
sudo chmod 600 ../test
|
||||||
|
scp -i ../private.key -P ${{ secrets.BLOG_PORT }} ../test blog@madeio.net:/var/www/html/
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{secrets.BLOG_SSH_KEY}}
|
||||||
|
SSH_KNOWN_HOSTS: ${{secrets.SSH_KNOWN_HOSTS}}
|
||||||
- run: |
|
- run: |
|
||||||
cd ${{ gitea.workspace }}
|
cd ${{ gitea.workspace }}
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
- run: echo "${{ BLOG_SSH_KEY }}" > key.priv
|
|
||||||
- run: scp -i key.priv -P ${{ secrets.BLOG_PORT }} -r build/* blog@madeio.net:/var/www/html/
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|||||||
Reference in New Issue
Block a user