Skip to content

update config

update config #14

Workflow file for this run

name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create .env file
run: echo PUBLIC_GTAG_KEY=${{ secrets.PUBLIC_GTAG_KEY }} > .env
- name: Build
run: docker-compose up --build -d
- name: Shut down
run: docker-compose down
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && success()
steps:
- uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/ssh-agent@v0.5.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to Server
run: |
ssh -o "StrictHostKeyChecking=no" ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_HOST }} 'cd ${{ secrets.PROJECT_PATH }} && git pull && docker-compose up -d'