Skip to content

Angular v18

Angular v18 #42

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Bundled Node Version
run: |
echo "Node version: $(which node):$(node -v)"
echo "NPM version: $(which npm):$(npm -v)"
- uses: volta-cli/action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Project Node Version
run: |
echo "Node version: $(which node):$(node -v)"
echo "NPM version: $(which npm):$(npm -v)"
Build:
needs: [Setup]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: volta-cli/action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-install-v3-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-install-v3-
- name: Install Dependencies
run: npm ci
- name: Type Check
run: npm run typecheck
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- if: github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: build-art
path: dist
Deploy:
needs: [Build]
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: awesomehub/awesomehub.github.io
token: ${{ secrets.PAT }}
path: deploy
- run: rm -r deploy/dist/*
- uses: actions/download-artifact@v4
id: download
with:
name: build-art
path: deploy/dist
- uses: peter-evans/create-pull-request@v3
with:
branch: staging
path: deploy
token: ${{ secrets.PAT }}
commit-message: ${{ github.event.head_commit.message }} ${{ github.event.head_commit.url }}
title: ${{ github.event.head_commit.message }}
body: |
## Build Information
- ### Action
${{ github.workflow }} [#${{ github.run_number }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})
- ### Commit
${{ github.event.head_commit.message }} ${{ github.event.head_commit.url }}
- ### Author
@${{ github.actor }}
---
> :rocket: *This report is autogenerated, any changes made will be overwrittten with the next commit.*
labels: |
deploy
automated
assignees: ${{ github.actor }}