-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Add deployment workflow for example
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Deploy Example App | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
env: | ||
MAIN_BRANCH_NAME: 'main' | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: nrwl/nx-set-shas@v4 | ||
with: | ||
main-branch-name: ${{ env.MAIN_BRANCH_NAME }} | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- name: Install Dependencies | ||
run: npm ci | ||
- name: Deploy | ||
run: npx nx affected -t build | ||
- name: Check if folder exists and set output | ||
id: dist-check | ||
run: echo "exists=$(test -d dist/apps/ng-remote-config-example && echo true || echo false)" >> $GITHUB_OUTPUT | ||
- name: Deploy | ||
if: steps.dist-check.outputs.exists == 'true' | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: dist/apps/ng-remote-config-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters