Skip to content

Revert "Deploying to main from @ 6381349349453ac395ca571add7cf488f1c… #17

Revert "Deploying to main from @ 6381349349453ac395ca571add7cf488f1c…

Revert "Deploying to main from @ 6381349349453ac395ca571add7cf488f1c… #17

Workflow file for this run

name: Build and Deploy Angular App
on:
push:
branches:
- main # 触发部署的分支,可以根据实际情况调整
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # 使用的 Node.js 版本
- name: Install Angular CLI
run: npm install -g @angular/cli
- name: Install dependencies
run: npm install
- name: Build Angular app
run: ng build --configuration=production
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: main # 要部署到的分支,比如 gh-pages
FOLDER: docs # Angular 应用程序的构建输出目录
CLEAN: true # 可选项,是否清除目标分支的其他文件,默认为 true