Merge pull request #2 from mooxl/dev #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clone or pull repository | |
on: | |
push: | |
branches: | |
- prod | |
jobs: | |
build: | |
name: Run remote SSH command | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: npm install dotenv | |
- name: Load environment variables from .env file | |
run: | | |
source .env.prod | |
- name: Print environment variable | |
run: echo $PAYLOAD_URL | |
- name: Trigger build via ssh | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.KEY }} | |
script: | | |
echo ${{ secrets.HOST }} |