mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-25 23:11:02 +08:00
build checker
This commit is contained in:
parent
03160d1ddb
commit
42dbe222ca
34
.github/workflows/lctt-article-checker.yml
vendored
34
.github/workflows/lctt-article-checker.yml
vendored
@ -1,14 +1,8 @@
|
||||
name: LCTT Article Checker
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
branches: [master]
|
||||
# pull_request:
|
||||
# branches: [ master ]
|
||||
schedule:
|
||||
- cron: "0 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -18,10 +12,6 @@ jobs:
|
||||
TRAVIS_PULL_REQUEST: ${{ github.event.number }}
|
||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||
steps:
|
||||
- name: Dump GitHub context
|
||||
env:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: echo "$GITHUB_CONTEXT"
|
||||
- name: Set ENV variables
|
||||
run: |
|
||||
echo "::set-env name=TRAVIS_BRANCH::${TRAVIS_BRANCH:-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')}"
|
||||
@ -29,25 +19,9 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: gh-pages
|
||||
path: build
|
||||
- name: Install JQ
|
||||
run: sudo apt install jq -y
|
||||
- name: "checkout master branch & return to pull request branch"
|
||||
run: CURRENT=$(echo ${{github.ref}} | sed "s|refs/|refs/remotes/|") && git checkout master && git checkout $CURRENT
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
- name: run check
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
run: sh ./scripts/check.sh;
|
||||
- name: run badge
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
run: sh ./scripts/badge.sh;
|
||||
- name: run status
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
run: sh ./scripts/status.sh;
|
||||
- uses: crazy-max/ghaction-github-pages@v2.2.0
|
||||
with:
|
||||
keep_history: true
|
||||
build_dir: ${{github.repository}}/build
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
Reference in New Issue
Block a user