This commit is contained in:
Ben Wilson
2023-06-21 09:36:38 -04:00
parent ae127ccde2
commit 0627fae904
2 changed files with 33 additions and 32 deletions

33
.github/workflows/gh-pages.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
name: GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist/angular-github-actions
enable_jekyll: true

View File

@@ -1,32 +0,0 @@
on: push
name: Build Angular
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install and npm run build
run: |
npm i
npm run build
- name: Push Build to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "dist/angular-githubaction/*"
token: ${{ secrets.TOKEN }}