Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add github actions yaml #1986

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions docs/zh/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,45 @@ laf website del [bucketName]
```shell
laf website custom [bucketName] [domain]
```

## Github Actions 自动发布

```yaml
name: LAF CI

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
env:
LAF_CLOUD_DIR: laf-cloud
LAF_APPID: ${{ secrets.LAF_APPID }}
LAF_PAT: ${{ secrets.LAF_PAT }}
API_URL: ${{ secrets.API_URL }}

steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Install laf-cli
run: npm install -g laf-cli

- name: Create User
run: laf user add ${{ env.LAF_APPID }} -r ${{ env.API_URL }}

- name: Switch User
run: laf user switch ${{ env.LAF_APPID }}

- name: Login
run: laf login ${{ env.LAF_PAT }}

- name: Laf App Init
run: laf app init ${{ env.LAF_APPID }}
working-directory: ${{ env.LAF_CLOUD_DIR }}

- name: Force Push Function
run: laf func push -f
working-directory: ${{ env.LAF_CLOUD_DIR }}
```
Loading