Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,6 @@ jobs:
git fetch origin gh-pages
git worktree add deploy-folder gh-pages

- name: backup lower environment files
if: ${{ steps.set-env.outputs.build_env == 'production' }}
env:
build_env: ${{ steps.set-env.outputs.build_env }}
run: |
mkdir -p development-backup
mkdir -p test-backup
cp -r deploy-folder/development/* development-backup/ || true
cp -r deploy-folder/test/* test-backup/ || true

- name: Clean Deployment Directory
env:
path: ${{ steps.set-env.outputs.path }}
Expand All @@ -96,16 +86,20 @@ jobs:
cp -r dist/cheems-angular/browser/* "$target_dir"
cp README.md .gitignore "$target_dir"
if [ "$build_env" = "production" ]; then
cp .pwa/inde.html "deploy-folder/"
cp .pwa/index.html "deploy-folder/"
cp README.md .gitignore "deploy-folder/"
fi

- name: Commit and Deploy to GitHub Pages
working-directory: deploy-folder
run: |
git add .
git commit -m "Deploy #${{ github.run_number }} from ${{ github.ref }} branch - ${{ steps.set-env.outputs.build_env }}"
GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts" git push git@github.com:${{ github.repository }} gh-pages --force
if git diff --cached --quiet; then
echo "No changes to commit. Skipping deployment."
else
git commit -m "Deploy #${{ github.run_number }} from ${{ github.ref }} branch - ${{ steps.set-env.outputs.build_env }}"
GIT_SSH_COMMAND="ssh -i ~/.ssh/deploy_key -o UserKnownHostsFile=~/.ssh/known_hosts" git push git@github.com:${{ github.repository }} gh-pages --force
fi

- name: Clean Up Worktree
run: git worktree remove deploy-folder --force
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="icon" type="image/x-icon" href="img/favicon.ico">
<link rel="manifest" href="manifest.webmanifest">
</head>
<body>
<body>
<app-root></app-root>
<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
Expand Down
Loading