Add new pipeline step to set environment variable before deploying to server. Include newly added deploy_env.json file specifying deployment environment as 'development'.
This commit is contained in:
parent
e8484f3456
commit
0be583ff98
2 changed files with 10 additions and 1 deletions
|
|
@ -10,7 +10,12 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
|
||||
- name: Set Environment
|
||||
id: set-env
|
||||
run: |
|
||||
echo "ENV=$(cat deploy_env.json | jq -r '.env')" >> $GITHUB_ENV
|
||||
echo "::set-output name=environment::$ENV"
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5.0.0
|
||||
with:
|
||||
|
|
@ -53,6 +58,7 @@ jobs:
|
|||
run: hugo --minify
|
||||
|
||||
- name: Deploy to Server
|
||||
if: ${{ github.job.outputs.environment == 'development' }}
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.0.0
|
||||
with:
|
||||
protocol: ftps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue