Angular v18 #38
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
Setup: | |
runs-on: ubuntu-latest | |
env: | |
VOLTA_FEATURE_PNPM: 1 | |
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)" | |
- name: Install PNPM | |
run: | | |
node -v | |
volta install pnpm | |
- name: PNPM Version | |
run: | | |
echo "PNPM version: $(which pnpm):$(pnpm -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: ~/.pnpm-store | |
key: pnpm-install-v3-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-install-v3- | |
- name: Install PNPM | |
run: volta install pnpm | |
- name: Install Dependencies | |
run: pnpm install | |
- name: Lint | |
run: pnpm lint | |
- name: Build | |
run: pnpm 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 }} |