diff --git a/.github/workflow/gh-pages.yml b/.github/workflow/gh-pages.yml new file mode 100644 index 0000000..bbd839f --- /dev/null +++ b/.github/workflow/gh-pages.yml @@ -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 \ No newline at end of file diff --git a/.github/workflow/pypi.yml b/.github/workflow/pypi.yml new file mode 100644 index 0000000..00d7c79 --- /dev/null +++ b/.github/workflow/pypi.yml @@ -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: | + python setup.py sdist + - name: Pypi Publish + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_password }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9015f7..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: node_js -node_js: stable -install: - - cd front - - npm install -script: - - npm run build -deploy: - provider: pages - skip_cleanup: true - local_dir: dist - github_token: $GITHUB_TOKEN - keep_history: true - fqdn: fastapi-admin.long2ice.cn - on: - branch: master - email: long2ice@gmail.com - edge: - branch: master - verbose: true \ No newline at end of file