mirror of
https://github.com/woodchen-ink/clash-and-dashboard.git
synced 2025-07-18 14:01:56 +08:00
38 lines
947 B
YAML
38 lines
947 B
YAML
name: Deploy
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Dashboard code
|
|
uses: actions/checkout@v2
|
|
- name: Setup Nodejs
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '15.x'
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
- name: Reuse Cache
|
|
uses: actions/cache@v2
|
|
id: yarn-cache
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- name: Install package
|
|
run: |
|
|
yarn
|
|
yarn build
|
|
- name: Deploy
|
|
uses: crazy-max/ghaction-github-pages@v2
|
|
with:
|
|
target_branch: gh-pages
|
|
build_dir: dist
|
|
fqdn: clash.razord.top
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|