diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml new file mode 100644 index 0000000..246250b --- /dev/null +++ b/.github/workflows/node.yml @@ -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 }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 069b5ca..0000000 --- a/.travis.yml +++ /dev/null @@ -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 diff --git a/README.md b/README.md index 8055df5..83ac2cd 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@

Web Dashboard for Clash, now host on ClashX

- - Travis-CI + + Travis-CI