Skip to content

Commit

Permalink
Create main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
igor17400 authored Nov 12, 2024
1 parent aa128b2 commit 35be6f6
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This is a basic workflow to help you get started with Actions

name: Deploy n2s-dsp

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "deploy"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v2
- name: Create the .ssh directory
run: |
mkdir -p ~/.ssh && chmod 700 ~/.ssh
- name: Install the deploy key
run: |
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/deploy
chmod 600 ~/.ssh/deploy
- name: Create the Known Hosts file
run: |
echo "${{ secrets.KNOWN_HOSTS }}" > ~/.ssh/known_hosts
- name: Deploy website
run: |
ssh -i ~/.ssh/deploy [email protected] "${{ secrets.PROJECT_NAME }}"

0 comments on commit 35be6f6

Please sign in to comment.