mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
Feature: use github actions
This commit is contained in:
parent
af2f931f2c
commit
65cc8d47cb
33
.github/workflows/node.yml
vendored
Normal file
33
.github/workflows/node.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
name: Deploy
|
||||||
|
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Dashboard code
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Setup Nodejs
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '13.x'
|
||||||
|
- name: Reuse Cache
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
- name: Install package
|
||||||
|
run: |
|
||||||
|
npm ci
|
||||||
|
npm run build
|
||||||
|
- name: Deploy
|
||||||
|
uses: crazy-max/ghaction-github-pages@v1
|
||||||
|
with:
|
||||||
|
target_branch: gh-pages
|
||||||
|
build_dir: dist
|
||||||
|
fqdn: clash.razord.top
|
||||||
|
env:
|
||||||
|
GITHUB_PAT: ${{ secrets.GITHUB_PAT }}
|
22
.travis.yml
22
.travis.yml
@ -1,22 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
sudo: false
|
|
||||||
node_js:
|
|
||||||
- "stable"
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- "$HOME/.npm"
|
|
||||||
install:
|
|
||||||
- "npm ci"
|
|
||||||
script:
|
|
||||||
- "npm run lint"
|
|
||||||
before_deploy:
|
|
||||||
- "npm run build"
|
|
||||||
deploy:
|
|
||||||
provider: pages
|
|
||||||
skip-cleanup: true
|
|
||||||
local-dir: dist
|
|
||||||
github-token: $GITHUB_TOKEN
|
|
||||||
fqdn: clash.razord.top
|
|
||||||
on:
|
|
||||||
repo: Dreamacro/clash-dashboard
|
|
||||||
branch: master
|
|
@ -8,8 +8,8 @@
|
|||||||
<h4 align="center">Web Dashboard for Clash, now host on ClashX</h4>
|
<h4 align="center">Web Dashboard for Clash, now host on ClashX</h4>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://travis-ci.org/Dreamacro/clash-dashboard">
|
<a href="https://github.com/Dreamacro/clash-dashboard/actions">
|
||||||
<img src="https://travis-ci.org/Dreamacro/clash-dashboard.svg?branch=master" alt="Travis-CI">
|
<img src="https://github.com/Dreamacro/clash-dashboard/workflows/node/badge.svg" alt="Travis-CI">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user