Skip to content

Commit

Permalink
fix(ci/deploy): Remove anchors in workflow file
Browse files Browse the repository at this point in the history
Since GHA Runners doesn't support anchors yet, they'll have to go, for now.
  • Loading branch information
SakuraIsayeki committed Feb 8, 2024
1 parent efcdf19 commit d251181
Showing 1 changed file with 33 additions and 15 deletions.
48 changes: 33 additions & 15 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Build & Package API
needs: build-test-solution
uses: Nodsoft/workflows/.github/workflows/package-dotnet.yml@main
strategy: &build-strategy
strategy:
matrix:
configuration: ['production', 'preview']
with:
Expand All @@ -39,41 +39,59 @@ jobs:
name: Build & Package Web App
needs: build-test-solution
uses: ./.github/workflows/build-package-web.yml
strategy: *build-strategy
strategy:
matrix:
configuration: ['production', 'preview']
with:
build_configuration: ${{ matrix.configuration }}
artifact_name: 'wowskarma_app_${{ matrix.configuration }}'


deploy-preview: &deploy-job
deploy-preview:
name: Deploy to Preview
environment:
name: preview
url: https://preview.wows-karma.com/
needs:
- build-package-api
- build-package-web
environment:
name: preview
url: https://preview.wows-karma.com/
strategy:
matrix:
artifact: [
{ name_pre: 'wowskarma_api', path: './api' },
{ name_pre: 'wowskarma_app', path: './web' }
]
uses: Nodsoft/workflows/.github/workflows/package-dotnet.yml@main
uses: Nodsoft/workflows/.github/workflows/deploy-ssh.yml@main
with:
artifact_name: ${{ matrix.artifact.name_pre }}_${{ inputs.configuration }}
artifact_name: ${{ matrix.artifact.name_pre }}_preview
artifact_path: ${{ matrix.artifact.path }}
host: ${{ secrets.SSH_HOST }}
user: ${{ secrets.SSH_USER }}
private_key: ${{ secrets.SSH_PRIVATEKEY }}
remote_path: ${{ secrets.SSH_DEPLOYPATH }}
post_deploy_cmd: ${{ secrets.SSH_CMD_RESTART_API }}

deploy-live:
<<: *deploy-job
name: Deploy to Live


deploy-production:
name: Deploy to Production
needs:
- build-package-api
- build-package-web
environment:
name: live
url: https://wows-karma.com/
needs:
- deploy-preview
url: https://wows-karma.com/
strategy:
matrix:
artifact: [
{ name_pre: 'wowskarma_api', path: './api' },
{ name_pre: 'wowskarma_app', path: './web' }
]
uses: Nodsoft/workflows/.github/workflows/deploy-ssh.yml@main
with:
artifact_name: ${{ matrix.artifact.name_pre }}_production
artifact_path: ${{ matrix.artifact.path }}
host: ${{ secrets.SSH_HOST }}
user: ${{ secrets.SSH_USER }}
private_key: ${{ secrets.SSH_PRIVATEKEY }}
remote_path: ${{ secrets.SSH_DEPLOYPATH }}
post_deploy_cmd: ${{ secrets.SSH_CMD_RESTART_API }}

0 comments on commit d251181

Please sign in to comment.