test
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 53s
All checks were successful
Build and Deploy Hugo Site / buildAndDeploy (push) Successful in 53s
This commit is contained in:
parent
e02a08be86
commit
873b3a66d7
1 changed files with 14 additions and 13 deletions
|
|
@ -22,15 +22,15 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: env-toml-file
|
||||
uses: SebRollen/toml-action@v1.2.0
|
||||
id: read_toml
|
||||
with:
|
||||
file: 'hugo.toml'
|
||||
field: 'params.environment'
|
||||
# - name: env-toml-file
|
||||
# uses: SebRollen/toml-action@v1.2.0
|
||||
# id: read_toml
|
||||
# with:
|
||||
# file: 'hugo.toml'
|
||||
# field: 'params.environment'
|
||||
|
||||
- name: Echo environment
|
||||
run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
|
||||
# - name: Echo environment
|
||||
# run: echo "Environment is ${{ steps.read_toml.outputs.value }}"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5.0.0
|
||||
|
|
@ -66,18 +66,19 @@ jobs:
|
|||
with:
|
||||
ssh-private-key: ${{ secrets.VFO_SSH_KEY }}
|
||||
|
||||
- name: Deploy to Development
|
||||
if: gitea.ref == '/heads/dev'
|
||||
- name: Deploy to Development
|
||||
if: github.ref == 'refs/heads/dev'
|
||||
run: |
|
||||
echo "Deploying to Development Environment"
|
||||
echo "Running steps for Development Environment"
|
||||
echo "user: $DEV_USER host: $DEV_HOST path: $DEV_PATH"
|
||||
rsync -avz ./public/ $DEV_USER@$DEV_HOST:$DEV_PATH
|
||||
env:
|
||||
RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no'
|
||||
|
||||
- name: Deploy to Production
|
||||
if: gitea.ref == 'refs/heads/main'
|
||||
if: github.ref == 'refs/heads/main'
|
||||
run: |
|
||||
echo "Deploying to Production Environment"
|
||||
echo "Running steps for Production Environment"
|
||||
rsync -avz ./public/ $PROD_USER@$PROD_HOST:$PROD_PATH
|
||||
env:
|
||||
RSYNC_RSH: 'ssh -p ${{ secrets.SSH_PORT }} -o StrictHostKeyChecking=no'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue