Merge pull request #465 from bettercodepaul/bugfix#1730-hinzufuegenMa… #248
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
name: Deploy to GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
- master | |
- develop | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
with: | |
persist-credentials: false | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: NPM install | |
working-directory: ./bogenliga | |
run: | | |
npm install | |
npm install | |
npm install -g @angular/[email protected] | |
- name: Build Angular | |
working-directory: ./bogenliga | |
run: ng build --deployUrl="/swt2-bsa-frontend/" --baseHref="https://bettercodepaul.github.io/swt2-bsa-frontend/" --prod --configuration=offline | |
- name: Show files | |
working-directory: ./bogenliga | |
run: | | |
ls -la | |
ls -la ./dist | |
- name: Deploy on GitHub Pages | |
uses: JamesIves/[email protected] | |
if: success() | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
FOLDER: ./bogenliga/dist/bogenliga # The folder the action should deploy. | |
BRANCH: gh-pages # The branch the action should deploy to. | |
TARGET_FOLDER: . | |
CLEAN: true # Automatically remove deleted files from the deploy branch | |
#COMMIT_MESSAGE: 'Deploy commit $GITHUB_SHA' | |
SILENT: true |