Skip to content

Commit

Permalink
[.github/workflows/main.yml] Fix Angular 18 with Vite build system; p…
Browse files Browse the repository at this point in the history
…arameterise whole task for better reuse across other sites
  • Loading branch information
SamuelMarks committed May 27, 2024
1 parent 123e538 commit e0cd098
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
DIST: 'dist/offscale-www'
TARGET: 'offscale/offscale.github.io'
CNAME: 'offscale.io'
run: |
npm i -g npm
npm i -g @angular/cli typescript angular-cli-ghpages
Expand All @@ -30,7 +33,8 @@ jobs:
git config --global user.name "$author"
email="${email_author#*<}"; email="${email::-1}"
git config --global user.email "$email"
cname='offscale.io'
ng build --configuration production --base-href 'https://'"$cname"
head -n6 README.md > 'dist/offscale-www/README.md'
npx angular-cli-ghpages --dir='dist/offscale-www' --cname="$cname" --repo='https://'"$GITHUB_TOKEN"'@github.com/offscale/offscale.github.io' --branch='master' --message="$MSG" --name="$name" --email="$email" --no-silent
ng build --configuration production --base-href 'https://'"$CNAME"
head -n6 README.md > "$DIST"'/README.md'
mv "$DIST"'/browser'/* "$DIST"
npx angular-cli-ghpages --dir="$DIST" --cname="$CNAME" --repo='https://'"$GITHUB_TOKEN"'@'"$TARGET" --branch='master' --message="$MSG" --name="$name" --email="$email" --no-silent

0 comments on commit e0cd098

Please sign in to comment.