update workflows

This commit is contained in:
long2ice
2020-04-22 11:28:05 +08:00
parent 509dc05ba2
commit 70a8167022
3 changed files with 0 additions and 33 deletions

35
.github/workflows/gh-pages.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: gh-pages
on:
push:
paths:
- 'front/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
env:
PRODUCTION_BASE_URL: /
BASE_URL: /
VUE_APP_API_URL: https://api-fastapi-admin.long2ice.cn:8443
run: npm run build
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: fastapi-admin.long2ice.cn

View File

@@ -1,33 +0,0 @@
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo Add other actions to build,
echo test, and deploy your project.

18
.github/workflows/pypi.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
name: pypi
on:
push:
paths:
- 'fastapi_admin/__init__.py'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build dists
run: |
python3 setup.py sdist
- name: Pypi Publish
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}