Skip to content

Commit

Permalink
use properties from package.json instead of environment variable for …
Browse files Browse the repository at this point in the history
…appDeployName
  • Loading branch information
stefanseifert committed Jul 10, 2023
1 parent 8cb05eb commit 7cf1ab8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Read version from package.json
- name: Read properties from package.json
id: package_json
uses: zoexx/github-action-json-file-properties@1.0.4
with:
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ jobs:
runs-on: ubuntu-latest
environment:
name: Production
url: "https://brdgm.me/${{ vars.APP_NAME }}"
url: "https://brdgm.me/${{ steps.package_json.outputs.appDeployName }}"

steps:
- uses: actions/checkout@v3

- name: Read properties from package.json
id: package_json
uses: zoexx/github-action-json-file-properties@1.0.4
with:
file_path: package.json

- uses: actions/setup-node@v3
with:
node-version: 18
Expand All @@ -37,5 +43,5 @@ jobs:
user-email: ${{ secrets.GH_SITE_DEPLOY_EMAIL }}
user-name: ${{ secrets.GH_SITE_DEPLOY_NAME }}
target-branch: main
commit-message: deploy ${{ vars.APP_NAME }}
target-directory: ${{ vars.APP_NAME }}
commit-message: deploy ${{ steps.package_json.outputs.appDeployName }} ${{ steps.package_json.outputs.version }}
target-directory: ${{ steps.package_json.outputs.appDeployName }}

0 comments on commit 7cf1ab8

Please sign in to comment.