ci: test
This commit is contained in:
parent
a2820fc088
commit
564f41f232
|
|
@ -8,82 +8,78 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
cdn:
|
cdn:
|
||||||
name: Qiniu CDN
|
name: CDN
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
# - uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
# - uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
# with:
|
with:
|
||||||
# node-version: '10.x'
|
node-version: '10.x'
|
||||||
- name: Download qshell
|
- name: Download qshell
|
||||||
run: |
|
run: |
|
||||||
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip
|
wget http://devtools.qiniu.com/qshell-linux-x86-v2.4.0.zip
|
||||||
unzip qshell-linux-x86-v2.4.0.zip
|
unzip qshell-linux-x86-v2.4.0.zip
|
||||||
mv qshell-linux-x86-v2.4.0 qshell
|
mv qshell-linux-x86-v2.4.0 qshell
|
||||||
# - name: Install packages
|
- name: Install packages
|
||||||
# run: npm i
|
run: npm i
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: npm run build:preview
|
run: npm run build:preview
|
||||||
- name: CDN login
|
- name: CDN login
|
||||||
run: ./qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
|
run: ./qshell account ${{ secrets.AK }} ${{ secrets.SK }} GITHUB_ACTION
|
||||||
# - name: CDN upload
|
- name: CDN upload
|
||||||
# run: |
|
run: |
|
||||||
# ./qshell qupload2 \
|
./qshell qupload2 \
|
||||||
# --src-dir=$GITHUB_WORKSPACE/dist \
|
--src-dir=$GITHUB_WORKSPACE/dist \
|
||||||
# --bucket=d2-cdn \
|
--bucket=d2-cdn \
|
||||||
# --key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \
|
--key-prefix=${GITHUB_REPOSITORY//*\//}/preview/ \
|
||||||
# --overwrite=true \
|
--overwrite=true \
|
||||||
# --check-exists=true \
|
--check-exists=true \
|
||||||
# --check-hash=true \
|
--check-hash=true \
|
||||||
# --check-size=true \
|
--check-size=true \
|
||||||
# --rescan-local=true \
|
--rescan-local=true \
|
||||||
# --thread-count=32
|
--thread-count=32
|
||||||
- name: CDN refresh
|
- name: CDN refresh
|
||||||
run: |
|
run: |
|
||||||
echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt
|
echo "https://cdn.d2.pub/${GITHUB_REPOSITORY//*\//}/preview/" > cdnrefresh.txt
|
||||||
cat cdnrefresh.txt | while read line
|
|
||||||
do
|
|
||||||
echo $line
|
|
||||||
done
|
|
||||||
./qshell cdnrefresh --dirs -i ./cdnrefresh.txt
|
./qshell cdnrefresh --dirs -i ./cdnrefresh.txt
|
||||||
|
|
||||||
# ftp:
|
ftp:
|
||||||
# name: D2 FTP
|
name: FTP
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
# - uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
# with:
|
with:
|
||||||
# node-version: '10.x'
|
node-version: '10.x'
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: |
|
run: |
|
||||||
# npm install
|
npm install
|
||||||
# npm run build:preview
|
npm run build:preview
|
||||||
# - name: Deploy
|
- name: Deploy
|
||||||
# uses: SamKirkland/FTP-Deploy-Action@2.0.0
|
uses: SamKirkland/FTP-Deploy-Action@2.0.0
|
||||||
# env:
|
env:
|
||||||
# FTP_SERVER: ${{ secrets.FTP_SERVER }}
|
FTP_SERVER: ${{ secrets.FTP_SERVER }}
|
||||||
# FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
|
||||||
# FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
|
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
|
||||||
# METHOD: sftp
|
METHOD: sftp
|
||||||
# PORT: ${{ secrets.FTP_PORT }}
|
PORT: ${{ secrets.FTP_PORT }}
|
||||||
# LOCAL_DIR: dist
|
LOCAL_DIR: dist
|
||||||
# REMOTE_DIR: /www/d2-admin/preview
|
REMOTE_DIR: /www/d2-admin/preview
|
||||||
# ARGS: --delete --verbose --parallel=100
|
ARGS: --delete --verbose --parallel=100
|
||||||
|
|
||||||
# gh-pages:
|
gh-pages:
|
||||||
# name: Github Pages
|
name: Github Pages
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# steps:
|
steps:
|
||||||
# - uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
# - uses: bahmutov/npm-install@v1
|
- uses: bahmutov/npm-install@v1
|
||||||
# - name: Build
|
- name: Build
|
||||||
# run: yarn build:github
|
run: yarn build:github
|
||||||
# - name: Deploy
|
- name: Deploy
|
||||||
# uses: peaceiris/actions-gh-pages@v2
|
uses: peaceiris/actions-gh-pages@v2
|
||||||
# env:
|
env:
|
||||||
# PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
PERSONAL_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
||||||
# PUBLISH_BRANCH: gh-pages
|
PUBLISH_BRANCH: gh-pages
|
||||||
# PUBLISH_DIR: ./dist
|
PUBLISH_DIR: ./dist
|
||||||
# with:
|
with:
|
||||||
# forceOrphan: true
|
forceOrphan: true
|
||||||
Loading…
Reference in New Issue