Skip to content

Commit

Permalink
One more attempt to use get prop custom action
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscarrollsmith committed Oct 5, 2023
1 parent e1c1b01 commit 9fe254a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,17 @@ jobs:
with:
commit_message: 'Automated build/blog feed update'

- name: Set the domain
id: set-domain
run: |
echo "DOMAIN=$(node -e 'console.log(new URL(require("./src/customizations/siteproperties.json").url).hostname)')" >> $GITHUB_OUTPUT
- name: Get domain
id: get-domain
uses: notiz-dev/github-action-json-property@release
with:
path: 'src/customizations/siteproperties.json'
prop_path: 'url'

- name: Add CNAME to dist
run: |
if [[ "${{ steps.set-domain.outputs.DOMAIN }}" != *.github.io ]]; then
echo ${{ steps.set-domain.outputs.DOMAIN }} > ./dist/CNAME
if [[ "${{ steps.get-domain.outputs.prop }}" != *.github.io ]]; then
echo ${{ steps.get-domain.outputs.prop }} > ./dist/CNAME
fi
- name: Deploy 🚀
Expand Down

0 comments on commit 9fe254a

Please sign in to comment.