-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
25 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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# Sample workflow for building and deploying a Jekyll site to GitHub Pages | ||
name: Deploy Jekyll with GitHub Pages dependencies preinstalled | ||
name: Deploy Angular App to GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
|
@@ -15,37 +14,45 @@ permissions: | |
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
# Allow only one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./frontend | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Build with Jekyll | ||
uses: actions/jekyll-build-pages@v1 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
source: ./frontend/ | ||
destination: ./_site | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
node-version: '20' | ||
cache: 'npm' | ||
cache-dependency-path: './frontend/package-lock.json' | ||
|
||
- name: Install Dependencies | ||
run: npm ci | ||
|
||
- name: Build Angular App | ||
run: npm run build -- --base-href=/your-repo-name/ | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "GitHub Actions Bot" | ||
git config user.email "<>" | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 | ||
uses: angular-schule/[email protected] | ||
with: | ||
github_access_token: ${{ secrets.GHPAGES }} | ||
build_configuration: production | ||
deploy_branch: gh-pages | ||
angular_project_dir: ./frontend | ||
output_dir: dist/drum-beat-repo |