Skip to content

Commit

Permalink
發布angular.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
RayJi0428 authored Jul 24, 2024
1 parent c24d822 commit e2a9d0e
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: 發布angular

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: gh-pages # 要部署到的分支,比如 gh-pages
FOLDER: dist/demo # Angular 应用程序的构建输出目录
CLEAN: true # 可选项,是否清除目标分支的其他文件,默认为 true

0 comments on commit e2a9d0e

Please sign in to comment.