mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 14:50:48 +08:00
27 lines
752 B
YAML
27 lines
752 B
YAML
on:
|
|
pull_request:
|
|
paths:
|
|
- "deploy-dist-to-surge.yml/**"
|
|
- ".github/workflows/deploy-dist-to-surge.yml"
|
|
push:
|
|
paths:
|
|
- "deploy-dist-to-surge.yml/**"
|
|
- ".github/workflows/deploy-dist-to-surge.yml"
|
|
env:
|
|
TZ: Asia/Shanghai
|
|
|
|
jobs:
|
|
job:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: 准备部署文件
|
|
run: |
|
|
mkdir dist
|
|
html="<!DOCTYPE html><html><body><h1>${{ github.event_name }}: ${{ github.sha }}</h1></body></html>"
|
|
echo $html > dist/index.html
|
|
- uses: yanhao98/composite-actions/deploy-dist-to-surge@main
|
|
id: surge_deploy
|
|
- name: Check Surge URL
|
|
run: |
|
|
echo "steps.surge_deploy.outputs.url: ${{ steps.surge_deploy.outputs.url }}"
|